delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/08/26/17:05:11

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

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


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019