inodes as doubles in lib/doscalls.c
Steve Langasek
vorlon at netexpress.net
Mon Jan 24 18:59:06 GMT 2000
On Mon, 24 Jan 2000, Jeremy Allison wrote:
>> Could someone please explain the following line to me (from dos_GetWd() in
>> lib/doscalls.c):
>> DEBUG(5,("dos_GetWd %s, inode %.0f, dev %.0f\n",s,(double)st.st_ino,(double)st.st_dev));
>> So is there a reason I'm missing why these values are being cast to doubles
>> here? I trust that all Unices *do* use ints for inodes... :D
> Nope - IRIX uses 64 bit ints for inodes.
An integer type of some sort, I meant, not necessarily 'int' itself.
>> Is this done
>> because there's no integer type large enough that's reliably supported by
>> the printf() family? I can do away with the cast on my system and use %l or
>> %ll, and everything works fine...
> Yes, that's exactly right. %ll is not standard accross all
> printfs I'm afraid.
If I put together an autoconf test to check whether %ll (or equivalent) is
available on the system, would this be acceptable?
Otherwise, if someone could tell me how to resolve the reference to __cmpdi2,
I'd greatly appreciate it :)
-Steve Langasek
postmodern programmer
More information about the samba-technical
mailing list