* libc/include/string.h (strdup, strndup): Declare if not

__STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
This commit is contained in:
Corinna Vinschen 2012-10-22 15:16:48 +00:00
parent e054398980
commit 6f7ae529ad
2 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
* libc/include/string.h (strdup, strndup): Declare if not
__STRICT_ANSI__ or _XOPEN_SOURCE is defined appropriately.
2012-10-22 Jon TURNEY <jon.turney@dronecode.org.uk>
* libc/include/stdlib.h (strtof, strtoll, strtoull, strtold):Prototype

View File

@ -10,6 +10,7 @@
#include "_ansi.h"
#include <sys/reent.h>
#include <sys/cdefs.h>
#include <sys/features.h>
#define __need_size_t
#include <stddef.h>
@ -65,9 +66,17 @@ char *_EXFUN(stpncpy,(char *, const char *, size_t));
int _EXFUN(strcasecmp,(const char *, const char *));
char *_EXFUN(strcasestr,(const char *, const char *));
char *_EXFUN(strchrnul,(const char *, int));
#endif
#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 500)
char *_EXFUN(strdup,(const char *));
#endif
#ifndef __STRICT_ANSI__
char *_EXFUN(_strdup_r,(struct _reent *, const char *));
#endif
#if !defined(__STRICT_ANSI__) || (_XOPEN_SOURCE >= 700)
char *_EXFUN(strndup,(const char *, size_t));
#endif
#ifndef __STRICT_ANSI__
char *_EXFUN(_strndup_r,(struct _reent *, const char *, size_t));
/* There are two common strerror_r variants. If you request
_GNU_SOURCE, you get the GNU version; otherwise you get the POSIX