From: k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at (Oberhumer Markus) Message-Id: <199608262057.WAA24058@c210.edvz.uni-linz.ac.at> Subject: d_ino in struct dirent ? To: djgpp-workers AT delorie DOT com (djgpp-workers) Date: Mon, 26 Aug 1996 22:57:12 -0200 (MET DST) Return-Read-To: markus DOT oberhumer AT jk DOT uni-linz DOT ac DOT at Content-Type: text Content-Length: 1159 =============================================================================== Markus F.X.J. Oberhumer 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 */