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: O_NDELAY versus O_NONBLOCK


Joel Sherrill wrote:
> 
> Chris Faylor wrote:
> >
> > On Sun, Sep 03, 2000 at 01:15:13PM -0500, Joel Sherrill wrote:
> > >
> > >Simple question.  They have different values in newlib but
> > >appear to have the same meaning.  Under Linux, they have
> > >the same value.
> > >
> > >What should newlib do?  If they are supposed to be treated semantically
> > >the same, then can they be the same value?
> >
> > That's a good question.  I notice that cygwin sporadically attempts to test
> > both values but it isn't consistent.
> 
> This is the same thing inside RTEMS.  I started tracked down a
> problem with fcntl and it turned out to be that the path did not
> check one of the part.
> 
> > Having them equal makes sense to me.
> 
> In starting to fix this, I came across another similar constant --
> FNBIO.  I don't even see it in the Linux headers, so it can't
> be that important. :)  Regardless, should this one be the same
> value as well -- or does it have different semantics?
> 
> Regardless, attached is a patch that makes O_NDELAY and O_NONBLOCK
> the same.
> 
> 2000-09-05      Joel Sherrill <joel@OARcorp.com>
> 
>         * libc/include/fcntl.h: Make O_NDELAY and O_NONBLOCK
>         have the same value.
> 
>

I have checked in a patch.  I changed it so _FNDELAY equals _FNONBLOCK
like the Linux version does.

-- Jeff Johnston (Red Hat Inc)

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