From 9f90ae04358fc3f78e1c561209cc7117309ddfd8 Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Wed, 13 Apr 2016 23:50:11 -0500 Subject: Feature test macros overhaul: string.h and strings.h overlaps strings.h is the header mandated for these functions in POSIX.1 prior to 2008 (when most of these were removed). The declarations in string.h are only for BSD compatibility. But when both headers are included, avoid duplicate declarations. Also, mark stpcpy and stpncpy as POSIX.1-2008. Signed-off-by: Yaakov Selkowitz --- newlib/libc/include/strings.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'newlib/libc/include/strings.h') diff --git a/newlib/libc/include/strings.h b/newlib/libc/include/strings.h index fdccfca30..e467467ac 100644 --- a/newlib/libc/include/strings.h +++ b/newlib/libc/include/strings.h @@ -7,6 +7,9 @@ #ifndef _STRINGS_H_ #define _STRINGS_H_ +/* These functions are already declared in with __BSD_VISIBLE */ +#if !(defined(_STRING_H_) && __BSD_VISIBLE) + #include "_ansi.h" #include #include @@ -32,4 +35,6 @@ int _EXFUN(strncasecmp,(const char *, const char *, size_t)); _END_STD_C +#endif /* !(_STRING_H_ && __BSD_VISIBLE) */ + #endif /* _STRINGS_H_ */ -- cgit v1.2.3