Adding confstr() to rtems

Joel Sherrill joel at rtems.org
Sun Aug 20 21:44:27 UTC 2017


On Sun, Aug 20, 2017 at 1:52 PM, Aditya Upadhyay <aadit0402 at gmail.com>
wrote:

> On Sun, Aug 20, 2017 at 11:13 PM, Joel Sherrill <joel at rtems.org> wrote:
> >
> >
> > On Sun, Aug 20, 2017 at 12:31 PM, Aditya Upadhyay <aadit0402 at gmail.com>
> > wrote:
> >>
> >> On Sun, Aug 20, 2017 at 10:07 PM, Joel Sherrill <
> joel.sherrill at gmail.com>
> >> wrote:
> >> > I agree those constants should be visible to all configurations when
> >> > the POSIX level is set correctly.
> >> >
> >> > Are the V7 (current POSIX 2008/2013) constants in that file?
> >> >
> >> Yes, V7 Constants are defined in that file but these v7 constants are
> >> guarded by __CYGWIN.
> >
> >
> > I think they should be guarded by the POSIX level only. But ask on
> > newlib at . It may be that they want it to be POSIX level plus cygwin or
> rtems.
> >
> But in newlib, confstr () implementation contain only V6 constants. Do
> i need to add V7 constants there in newlib ? or Can we add confstr to
> rtems itself ?
>

IMO all of the V6 and V7 constants should be defined with proper POSIX
guards in newlib.

For the implementation, if Cygwin (or Linux) can return anything other
than an empty string for some of those values, then the implementation
would have to be part of their code. I just don't see a proper
implementation
residing in newlib.


> > I suspect POSIX level alone is correct though.
> >
> If POSIX level alone is correct, in that case we need to remove the
> __CYGWIN_ guard.
> > --joel
> >
> >>
> >> > On Sun, Aug 20, 2017 at 11:27 AM, Aditya Upadhyay <
> aadit0402 at gmail.com>
> >> > wrote:
> >> >>
> >> >> Hello All,
> >> >>
> >> >> I was trying to port confstr support in rtems from freebsd. In file
> >> >> unistd.h resided at location :
> >> >> /development/rtems/4.12/sparc-rtems4.12/include/sys
> >> >> has contains the name values only for cygwin guard.
> >> >>
> >> >> I have added the following names values guarded by __POSIX_VISIBLE >=
> >> >> 200112
> >> >> #if __POSIX_VISIBLE >= 199209
> >> >> #define    _CS_PATH        1    /* default value of PATH */
> >> >> #endif
> >> >>
> >> >> #if __POSIX_VISIBLE >= 200112
> >> >> #define    _CS_POSIX_V6_ILP32_OFF32_CFLAGS        2
> >> >> #define    _CS_POSIX_V6_ILP32_OFF32_LDFLAGS    3
> >> >> #define    _CS_POSIX_V6_ILP32_OFF32_LIBS        4
> >> >> #define    _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS    5
> >> >> #define    _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS    6
> >> >> #define    _CS_POSIX_V6_ILP32_OFFBIG_LIBS        7
> >> >> #define    _CS_POSIX_V6_LP64_OFF64_CFLAGS        8
> >> >> #define    _CS_POSIX_V6_LP64_OFF64_LDFLAGS        9
> >> >> #define    _CS_POSIX_V6_LP64_OFF64_LIBS        10
> >> >> #define    _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS    11
> >> >> #define    _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS    12
> >> >> #define    _CS_POSIX_V6_LPBIG_OFFBIG_LIBS        13
> >> >> #define    _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS    14
> >> >> #endif
> >> >>
> >> >> It is working. Please correct me if i am not going in right
> direction.
> >> >>
> >> >> Thanks & Regards,
> >> >> Aditya Upadhyay
> >> >> _______________________________________________
> >> >> devel mailing list
> >> >> devel at rtems.org
> >> >> http://lists.rtems.org/mailman/listinfo/devel
> >> >
> >> >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20170820/45a7471b/attachment-0002.html>


More information about the devel mailing list