Hi, I tried the latest from gnulib via coreutils, and saw this:
In file included from test-string-c++.cc:23: ../lib/string.h:301: error: type of 'memchr' is unknown ../lib/string.h:301: error: invalid type in declaration before ';' token ../lib/string.h:301: error: 'int memchr' redeclared as different kind of symbol /usr/include/string.h:76: error: previous declaration of 'const void* memchr(cons t void*, int, size_t)' In file included from test-string-c++.cc:23: ../lib/string.h:371: error: no matches converting function 'memrchr' to type 'voi d* (*)(const void*, int, size_t)' /usr/include/string.h:114: error: candidates are: void* memrchr(void*, int, size_ t) /usr/include/string.h:116: error: const void* memrchr(const void* , int, size_t) ../lib/string.h:372: error: type of 'memrchr' is unknown In file included from test-string-c++.cc:23: ../lib/string.h:372: error: invalid type in declaration before ';' token ../lib/string.h:372: error: 'int memrchr' redeclared as different kind of symbol /usr/include/string.h:116: error: previous declaration of 'const void* memrchr(co nst void*, int, size_t)' In file included from test-string-c++.cc:23: ../lib/string.h:572: error: no matches converting function 'strpbrk' to type 'cha r* (*)(const char*, const char*)' /usr/include/string.h:292: error: candidates are: char* strpbrk(char*, const char *) /usr/include/string.h:294: error: const char* strpbrk(const char* , const char*) ../lib/string.h:574: error: type of 'strpbrk' is unknown ../lib/string.h:574: error: invalid type in declaration before ';' token ../lib/string.h:574: error: 'int strpbrk' redeclared as different kind of symbol /usr/include/string.h:294: error: previous declaration of 'const char* strpbrk(co nst char*, const char*)' In file included from test-string-c++.cc:23: ../lib/string.h:662: error: no matches converting function 'strstr' to type 'char * (*)(const char*, const char*)' /usr/include/string.h:319: error: candidates are: char* strstr(char*, const char* ) /usr/include/string.h:321: error: const char* strstr(const char*, const char*) ../lib/string.h:664: error: type of 'strstr' is unknown ../lib/string.h:664: error: invalid type in declaration before ';' token ../lib/string.h:664: error: 'int strstr' redeclared as different kind of symbol /usr/include/string.h:321: error: previous declaration of 'const char* strstr(con st char*, const char*)' test-string-c++.cc:28: error: 'memchr' is not a member of 'gnulib' make[3]: *** [test-string-c++.o] Error 1 ------------------------------------------------------------------ After a little preprocessing, I found this: k.cc:3:1: warning: "__STDC__" redefined <built-in>: warning: this is the location of the previous definition k.cc:5:1: warning: "__STDC_HOSTED__" redefined <built-in>: warning: this is the location of the previous definition k.cc:3563: error: no matches converting function 'memchr' to type 'void* (*)(const void*, int, size_t)' k.cc:3052: error: candidates are: void* memchr(void*, int, size_t) k.cc:3054: error: const void* memchr(const void*, int, size_t) k.cc:3566: error: type of 'memchr' is unknown k.cc:3566: error: invalid type in declaration before ';' token k.cc:3566: error: 'int memchr' redeclared as different kind of symbol k.cc:3054: error: previous declaration of 'const void* memchr(const void*, int, size_t)' k.cc:3573: error: no matches converting function 'memrchr' to type 'void* (*)(const void*, int, size_t)' k.cc:3079: error: candidates are: void* memrchr(void*, int, size_t) k.cc:3081: error: const void* memrchr(const void*, int, size_t) k.cc:3574: error: type of 'memrchr' is unknown k.cc:3574: error: invalid type in declaration before ';' token k.cc:3574: error: 'int memrchr' redeclared as different kind of symbol k.cc:3081: error: previous declaration of 'const void* memrchr(const void*, int, size_t)' k.cc:3597: error: no matches converting function 'strpbrk' to type 'char* (*)(const char*, const char*)' k.cc:3238: error: candidates are: char* strpbrk(char*, const char*) k.cc:3240: error: const char* strpbrk(const char*, const char*) k.cc:3599: error: type of 'strpbrk' is unknown k.cc:3599: error: invalid type in declaration before ';' token k.cc:3599: error: 'int strpbrk' redeclared as different kind of symbol k.cc:3240: error: previous declaration of 'const char* strpbrk(const char*, const char*)' k.cc:3601: error: no matches converting function 'strstr' to type 'char* (*)(const char*, const char*)' k.cc:3252: error: candidates are: char* strstr(char*, const char*) k.cc:3254: error: const char* strstr(const char*, const char*) k.cc:3603: error: type of 'strstr' is unknown k.cc:3603: error: invalid type in declaration before ';' token k.cc:3603: error: 'int strstr' redeclared as different kind of symbol k.cc:3254: error: previous declaration of 'const char* strstr(const char*, const char*)' Line 3563 starts here: ------------------------------ namespace gnulib { static void * (*memchr) (void const *__s, int __c, size_t __n) = ::memchr; } extern "C" int _gl_cxxalias_dummy; extern __typeof__ (memchr) memchr __attribute__ ((__warning__ ("The symbol ::" "memchr" " refers to the system function. " "Use " "gnulib" "::" "memchr" " instead."))); namespace gnulib { static void * (*mempcpy) (void *__restrict __dest, void const *__restrict __src, size_t __n) = ::mempcpy; } extern "C" int _gl_cxxalias_dummy ; extern __typeof__ (mempcpy) mempcpy __attribute__ ((__warning__ ("The symbol ::" "mempcpy" " refers to the system function. " "Use " "gnulib" "::" "mempcpy" " instead.")));