inodes as doubles in lib/doscalls.c

Jeremy Allison jeremy at
Mon Jan 24 19:42:44 GMT 2000

Steve Langasek 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));
> The reason I ask is that it's causing problems when trying to build
> pam_smbpass against SAMBA_TNG's shared libraries.  On RedHat 6.0 with
> egcs-2.91.66, the above line of code generates an undefined reference to
> __cmpdi2.  Apparently, egcs takes care of this on its own when building an
> executable, but I can't get it to link properly when building a shared lib.
> 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. 

> 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.


Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.

More information about the samba-technical mailing list