diff options
author | Wilco Dijkstra <wdijkstr@arm.com> | 2017-02-15 15:13:58 +0000 |
---|---|---|
committer | Wilco Dijkstra <wdijkstr@arm.com> | 2017-02-15 15:13:58 +0000 |
commit | 3172b27b2b3b0033e85ddf3566c7533a8f3b4bda (patch) | |
tree | 60b9c9151fde381402925910ba64b5c7a5b73c99 /include | |
parent | 4918e5f4cd63290bb0b2c614f52092ca6a779126 (diff) | |
download | glibc-3172b27b2b3b0033e85ddf3566c7533a8f3b4bda.zip glibc-3172b27b2b3b0033e85ddf3566c7533a8f3b4bda.tar.gz glibc-3172b27b2b3b0033e85ddf3566c7533a8f3b4bda.tar.bz2 |
The internal header include/string.h does not work in C++: it causes link errors
in several C++ debug tests when any of the functions it declares are called.
The best option would be to not use internal headers for tests (unless
explicitly needed). Add guards so that it is safe to use include/string.h from
C++.
* include/string.h: Add __cplusplus check.
Diffstat (limited to 'include')
-rw-r--r-- | include/string.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/string.h b/include/string.h index 07389f3..45eca3c 100644 --- a/include/string.h +++ b/include/string.h @@ -1,6 +1,6 @@ #ifndef _STRING_H -#ifndef _ISOMAC +#if !defined _ISOMAC && !defined __cplusplus #include <sys/types.h> extern void *__memccpy (void *__dest, const void *__src, @@ -53,7 +53,7 @@ extern char *__strerror_r (int __errnum, char *__buf, size_t __buflen); above are defined as macros in the headers. */ #include <string/string.h> -#ifndef _ISOMAC +#if !defined _ISOMAC && !defined __cplusplus extern __typeof (strcoll_l) __strcoll_l; extern __typeof (strxfrm_l) __strxfrm_l; extern __typeof (strcasecmp_l) __strcasecmp_l; |