This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: X_OK redefinition protection for Cygwin.


"J. Johnston" wrote:
> 
> Earnie Boyd wrote:
> >
> > What's the status of this patch?
> >
> 
> I've been having some internal discussions about this.  There's a question about why
> you are seeing a warning message considering the defines/declarations are identical.
> 

X_OK is defined twice in both Cygwin's sys/file.h and newlib's
sys/unistd.h.  The code is set to #undef X_OK if __CYGWIN__ and !
__INSIDE_CYGWIN__ so that it can redefine it but doesn't take care of it
being defined by more than one header.

I made a similar change to Cygwin's sys/file.h but the patch was
modified by C. Faylor and I haven't had a chance to see what's he's
applied.  Basically, only protecting X_OK instead of the group of four.

Possibly a different patch would be more appropriate.  I can take a look
Sunday.

Earnie.

P.S.: The problem can be seen by simply:

---foo.c---
#include <sys/file.h>
#include <sys/unistd.h>
---end foo.c---

gcc -c foo.c

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]