www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/09/18/08:18:15

Date: Wed, 18 Sep 1996 14:53:46 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Mark Habersack <grendel AT ananke DOT amu DOT edu DOT pl>
Cc: djgpp AT delorie DOT com, DJ Delorie <dj AT delorie DOT com>
Subject: Re: 1 bug(?) open/readdir & glob
In-Reply-To: <Pine.NEB.3.95.960918130759.170I-100000@ananke.amu.edu.pl>
Message-Id: <Pine.SUN.3.91.960918144724.1273F-100000@is>
Mime-Version: 1.0

On Wed, 18 Sep 1996, Mark Habersack wrote:

> which has a Hid/Sys attribute set doesn't get reported. This is inconsistent
> (at least in case of readdir()) with the documentation and behavior on Unix.
> readdir() is supposed to return EVERY entry in directory. On Unix it reads
> physical dirents, reporting all of them. I consider this being a bug because
> it causes the code to work differently on MS-DOG and Unix.

This is one area where the desire to be compatible with both Unix and
MSDOS lead to contradiction that has to be resolved in a somewhat kludgy
(IMHO) way.  Since on MSDOS the hidden files aren't usually shown,
`readdir' doesn't ask for them.  If you make `readdir' behave otherwise,
MSDOS programs which use `readdir' will suffer.  Portable programs that
absolutely must see all the directory entries, should set the bits in the
`__opendir_flags' variable (look it up in the library docs) to that
effect. 

- Raw text -


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