Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowi@redhat.com>2016-04-14 07:50:11 +0300
committerYaakov Selkowitz <yselkowi@redhat.com>2016-04-14 07:50:11 +0300
commit9f90ae04358fc3f78e1c561209cc7117309ddfd8 (patch)
treed2b17119d1da5a5ad585e47fa2ff1eab5d047887 /newlib/libc/include/strings.h
parent7b391244009ebca831aa8f8dac82112a9daa9023 (diff)
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 <yselkowi@redhat.com>
Diffstat (limited to 'newlib/libc/include/strings.h')
-rw-r--r--newlib/libc/include/strings.h5
1 files changed, 5 insertions, 0 deletions
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 <string.h> with __BSD_VISIBLE */
+#if !(defined(_STRING_H_) && __BSD_VISIBLE)
+
#include "_ansi.h"
#include <sys/reent.h>
#include <sys/cdefs.h>
@@ -32,4 +35,6 @@ int _EXFUN(strncasecmp,(const char *, const char *, size_t));
_END_STD_C
+#endif /* !(_STRING_H_ && __BSD_VISIBLE) */
+
#endif /* _STRINGS_H_ */