This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: feature macros in stdlib.h
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: newlib at sourceware dot org
- Date: Mon, 13 Jan 2014 08:35:21 +0100
- Subject: Re: feature macros in stdlib.h
- Authentication-results: sourceware.org; auth=none
- References: <52D1F107 dot 3050504 at oarcorp dot com>
Hello Joel,
I would use the FreeBSD mechanism for this, e.g.
http://svnweb.freebsd.org/base/head/include/stdlib.h?revision=254151&view=markup
/*
* Extensions made by POSIX relative to C. We don't know yet which edition
* of POSIX made these extensions, so assume they've always been there until
* research can be done.
*/
#if __POSIX_VISIBLE /* >= ??? */
int posix_memalign(void **, size_t, size_t); /* (ADV) */
int rand_r(unsigned *); /* (TSF) */
char *realpath(const char * __restrict, char * __restrict);
int setenv(const char *, const char *, int);
int unsetenv(const char *);
#endif
[...]
/*
* The only changes to the XSI namespace in revision 6 were the deletion
* of the ttyslot() and valloc() functions, which FreeBSD never declared
* in this header. For revision 7, ecvt(), fcvt(), and gcvt(), which
* FreeBSD also does not have, and mktemp(), are to be deleted.
*/
#if __XSI_VISIBLE
[...]
int putenv(char *);
[...]
#endif /* __XSI_VISIBLE */
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.