Mail Archives: djgpp-workers/1996/08/26/17:05:11
===============================================================================
Markus F.X.J. Oberhumer <markus DOT oberhumer AT jk DOT uni-linz DOT ac DOT at>
Subject: d_ino in struct dirent ?
To: djgpp-workers AT delorie DOT com
===============================================================================
Once again the missing field d_ino in struct dirent has caused
problems when porting a Linux program (ezmake 1.1).
All programs I've seen so far only compare d_ino with 0 and don't
need the real inode number.
What about setting d_ino to 1 by default (or using a static counter) ?
We also could add something like __OPENDIR_INODE to __opendir_flags.
The implementation could temporary change _djstat_flags and then
just call stat() for inode computation - should not be much work.
Adding d_ino is incompatible with existing libraries, though :-(.
Are there any other incompatible changes for 2.01 yet ?
from ezmake-1.1/glob.c:
#if defined (_POSIX_SOURCE)
/* Posix does not require that the d_ino field be present, and some
systems do not provide it. */
#define REAL_DIR_ENTRY(dp) 1
#else
#define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
#endif /* _POSIX_SOURCE */
- Raw text -