This is the mail archive of the
mailing list for the newlib project.
Re: Proper Conditionals for POSIX CX and XSI
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "Joseph S. Myers" <joseph at codesourcery dot com>
- Cc: "Yaakov (Cygwin/X)" <yselkowitz at users dot sourceforge dot net>, "newlib at sourceware dot org" <newlib at sourceware dot org>
- Date: Thu, 18 Jul 2013 11:01:20 -0500
- Subject: Re: Proper Conditionals for POSIX CX and XSI
- References: <51E6FFD2 dot 3030000 at oarcorp dot com> <51E76BEC dot 4080200 at users dot sourceforge dot net> <51E73D3D dot 6000809 at embedded-brains dot de> <51E7A0E6 dot 2020208 at users dot sourceforge dot net> <51E7FD15 dot 7010401 at oarcorp dot com> <Pine dot LNX dot 4 dot 64 dot 1307181448140 dot 20328 at digraph dot polyomino dot org dot uk>
On 7/18/2013 9:49 AM, Joseph S. Myers wrote:
On Thu, 18 Jul 2013, Joel Sherrill wrote:
FWIW glibc uses this for memccpy() which is an XSI routine. It is
not protected in newlib:
#if defined __USE_SVID || defined __USE_BSD || defined __USE_XOPEN
extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
int __c, size_t __n)
__THROW __nonnull ((1, 2));
#endif /* SVID. */
There are a great many bugs in the header conditionals in glibc. You
should refer to the relevant standards in each case rather than assuming
the glibc headers are correct.
I am trying to write the rules to give to a future volunteer which
may or may not be me.
Is it possible to get group consensus on the conditionals which reflect
each of the columns in the API tables for SUS V4?
I am having trouble seeing how each API standard doesn't correspond
to a single conditional or maybe a POSIX standard range. And if it
was required by K&R or C89 or XXX, then it is unconditional.
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985