bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mingw fopen bug


From: Bruno Haible
Subject: Re: mingw fopen bug
Date: Tue, 23 Sep 2008 02:15:27 +0200
User-agent: KMail/1.5.4

Hi Eric,

Eric Blake wrote:
> Adding such a workaround would allow code like this to work on mingw:
> 
> FILE *f = fopen (".", "r");
> DIR *d = fdopendir (fileno (f));
> readdir (d);

I understand the heavy use of fdopendir() in coreutils: on those systems
which implement this function natively, it's a race-free alternative to
opendir(). Therefore I find it reasonable to emulate fdopendir() in gnulib.

But fopen() on a directory? Who does that? If no-one needs that, I would be
satisfied with mentioning the problem under "Portability problems not fixed by
Gnulib" in the doc.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]