Add realpath Prototype
Corinna Vinschen
vinschen@redhat.com
Wed Nov 20 15:02:00 GMT 2013
On Nov 20 08:35, Joel Sherrill wrote:
> On 11/20/2013 8:26 AM, Corinna Vinschen wrote:
> > On Nov 20 07:38, Joel Sherrill wrote:
> >> On 11/20/2013 3:46 AM, Corinna Vinschen wrote:
> >>> On Nov 19 12:42, Corinna Vinschen wrote:
> >>>> On Nov 18 13:32, Joel Sherrill wrote:
> >>>>> On 11/18/2013 12:33 PM, Yaakov (Cygwin/X) wrote:
> >>>>>> On 2013-11-18 12:24, Joel Sherrill wrote:
> >>>>>>> I added the realpath() prototype more or less where
> >>>>>>> glibc has it in stdlib.h.
> >>>>>>>
> >>>>>>> Also added restrict to Linux implementation.
> >>>>>>>
> >>>>>>> Does this look ok to commit?
> >>>>>>
> >>>>>> Your patch includes a duplicate declaration of qsort().
> >>>>>
> >>>>> Fixed. Stupid cut and paste.
> >>>>>
> >>>>>> Also, Cygwin provides its own prototype of realpath in
> >>>>>> its own headers, so either that needs to be removed, or
> >>>>>> this prototype placed in a !__CYGWIN__ block; I'll let
> >>>>>> Corinna decide which she prefers.
> >>>>>
> >>>>> Since this wasn't in newlib, I didn't know about it. I have
> >>>>> been trusting grep. :)
> >>>>>
> >>>>> Whatever Corinna wants to do, I am ok with.
> >>>>
> >>>> Just apply your patch. I'll remove the Cygwin definition
> >>>> afterwards.
> >>>
> >>> FYI, I moved the readline declaration into the following
> >>> `#ifndef __STRICT_ANSI__' block, analogue to the old
> >>> Cygwin-only declaration.
> >> . Thanks. The guards are tricky. glibc has
> >>
> >> #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
> >>
> >> http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html
> >>
> >>
> marks it as XSI with no explicit macros that I am spotting.
> >>
> >> Is that close enough?
> >
> > I don't understand the question. BSD and XOPEN don't correspond
> > to strict ANSI.
>
> I was just pointing out that glibc has BSD and XOPEN as guards.
> Is that equivalent?
It's not exactly equivalent, but __USE_BSD and __USE_XOPEN_EXTENDED
are probably not set if strict ANSI is requested.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20131120/4bb5deda/attachment.sig>
More information about the Newlib
mailing list