This is the mail archive of the newlib@sourceware.org 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]
Other format: [Raw text]

Re: [PATCH] Feature test macros: ctermid, cuserid


On May 22 17:30, Joel Sherrill wrote:
> 
> 
> On 5/21/2016 11:50 AM, Corinna Vinschen wrote:
> > On May 20 17:11, Yaakov Selkowitz wrote:
> > > The proper location for these functions has always been <stdio.h>, however
> > > XPG4 and SUSv2 did mandate a duplicate declaration in <unistd.h>.  cuserid
> > > was dropped in SUSv3 (it was marked legacy since XPG4) and the ctermid
> > > declaration in <unistd.h> was made optional and obsolete in SUSv4.
> > > 
> > > Fixes: https://cygwin.com/ml/cygwin/2016-05/msg00002.html
> > 
> > Thanks, just one point of discussion:
> > 
> > > +#if __POSIX_VISIBLE
> > >  #ifdef __CYGWIN__
> > >  #define L_ctermid       16
> > >  #endif
> > 
> > I think we should get rid of the ifdef CYGWIN.  This is a POSIX mandated
> > macro (for some given value of POSIX) so we should simply enable it for
> > all targets.  If any system has a particular wish to change the numbers
> > we can adapt.
> 
> Speaking for RTEMS, our tools and OS are always built from source so
> changing numbers is no big deal to us. We would **MUCH** rather use
> common definitions and prototypes.
> 
> It really makes it easier for us all to have confidence we are following
> standards when we share the same code.

Good point.  Yaakov, patch is ok with #ifdef __CYGWIN__ removed.

In future we should always keep this in mind.  Anything which is define
inside __CYGWIN__ guards but actually standards-required should be
released to all targets.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


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