Author: rsmith Date: Thu Feb 11 17:51:02 2016 New Revision: 260622 URL: http://llvm.org/viewvc/llvm-project?rev=260622&view=rev Log: Instead of asking glibc to provide correct C++ signatures for <string.h> functions, ask it whether it did provide them after the fact. Some versions of glibc fail to compile if you make this request and don't also claim to be at least GCC 4.3.
Modified: libcxx/trunk/include/string.h Modified: libcxx/trunk/include/string.h URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string.h?rev=260622&r1=260621&r2=260622&view=diff ============================================================================== --- libcxx/trunk/include/string.h (original) +++ libcxx/trunk/include/string.h Thu Feb 11 17:51:02 2016 @@ -58,17 +58,13 @@ size_t strlen(const char* s); #pragma GCC system_header #endif -#ifdef __cplusplus -#define __CORRECT_ISO_CPP_STRING_H_PROTO -#endif - #include_next <string.h> -// MSVCRT, GNU libc and its derivates already have the correct prototype in -// <string.h> if __cplusplus is defined. This macro can be defined by users if -// their C library provides the right signature. -#if defined(__GLIBC__) || defined(_LIBCPP_MSVCRT) || defined(__sun__) || \ - defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_) +// MSVCRT, GNU libc and its derivates may already have the correct prototype in +// <string.h>. This macro can be defined by users if their C library provides +// the right signature. +#if defined(__CORRECT_ISO_CPP_STRING_H_PROTO) || defined(_LIBCPP_MSVCRT) || \ + defined(__sun__) || defined(_STRING_H_CPLUSPLUS_98_CONFORMANCE_) #define _LIBCPP_STRING_H_HAS_CONST_OVERLOADS #endif _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits