delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1996/08/27/00:30:07

Date: Tue, 27 Aug 1996 07:26:05 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Oberhumer Markus <k3040e4 AT c210 DOT edvz DOT uni-linz DOT ac DOT at>
Cc: djgpp-workers <djgpp-workers AT delorie DOT com>
Subject: Re: d_ino in struct dirent ?
In-Reply-To: <199608262057.WAA24058@c210.edvz.uni-linz.ac.at>
Message-Id: <Pine.SUN.3.91.960827072052.11185C-100000@is>
Mime-Version: 1.0

On Mon, 26 Aug 1996, Oberhumer Markus wrote:

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

If at all needed, call `_invent_inode' and forget about `stat' (it's too 
expensive and will invent inode anyway on some platforms), because no 
program I've seen uses the value of `d_ino' besides testing if it's zero.

Personally, I think that any program that requires this field is broken
and should be fixed (by providing an appropriate #ifdef).  All GNU
programs that need `d_ino' rely on (autoconfigure and) "config.h" to tell
them whether such a feature exists.

- Raw text -


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