[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] using dev_t and ino_t
From: |
Paul Eggert |
Subject: |
Re: [bug-gnulib] using dev_t and ino_t |
Date: |
Thu, 10 Feb 2005 09:42:28 -0800 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
address@hidden (Karl Berry) writes:
> Are there portability problems with using dev_t and ino_t?
They were in 7th Edition Unix <sys/types.h> so they're universal in
Unix-like hosts. POSIX requires them. However, I vaguely recall that
there are some non-Unix non-POSIX hosts that lack ino_t (because they
don't have inodes). From the diffutils changelog:
Fri Aug 27 06:59:03 1993 Paul Eggert (address@hidden)
* cmp.c (main): ...
Avoid mentioning `dev_t', `ino_t' for portability to nonstandard hosts.
Also, coreutils has an AC_CHECK_TYPE(ino_t, unsigned long int). But
interestingly enough gnulib does not check for ino_t -- perhaps a
portability glitch in gnulib?
Anyway, I wouldn't lose a lot of sleep over assuming them.
PS. While we're on the portability subject, POSIX says that dev_t
might be a floating-point or even complex type, but ino_t must be an
unsigned integer type. A little weird, but that's what it says.