[PATCH] Feature test macros: ctermid, cuserid
Corinna Vinschen
vinschen@redhat.com
Mon May 23 08:26:00 GMT 2016
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20160523/5149a252/attachment.sig>
More information about the Newlib
mailing list