On 08/26/2009 05:36 PM, Ralf Wildenhues wrote:
* Jason Merrill wrote on Wed, Aug 26, 2009 at 10:32:05PM CEST:

The problem is that AC_CHECK_DECLS gets confused by overloaded
functions, and glibc 2.10 has overloaded declarations of basename
and some other string functions for const-correctness.

Could you show the config.log snippet that shows the failed test?
Is this a new error due to the autotools upgrade, or new due to
glibc 2.10?

The latter.

configure:5483: checking whether basename is declared
configure:5483: g++ -c -g  conftest.cpp >&5
conftest.cpp: In function 'int main()':
conftest.cpp:77: error: void cast cannot resolve address of overloaded function
configure:5483: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "cpplib"
| #define PACKAGE_TARNAME "cpplib"
| #define PACKAGE_VERSION " "
| #define PACKAGE_STRING "cpplib  "
| #define PACKAGE_BUGREPORT "gcc-b...@gcc.gnu.org"
| #define PACKAGE_URL ""
| #define TIME_WITH_SYS_TIME 1
| #define STRING_WITH_STRINGS 1
| #define HAVE_LOCALE_H 1
| #define HAVE_FCNTL_H 1
| #define HAVE_LIMITS_H 1
| #define HAVE_STDDEF_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_STRING_H 1
| #define HAVE_SYS_FILE_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_OBSTACK 1
| #define SIZEOF_INT 4
| #define SIZEOF_LONG 4
| #define HAVE_CLEARERR_UNLOCKED 1
| #define HAVE_FEOF_UNLOCKED 1
| #define HAVE_FERROR_UNLOCKED 1
| #define HAVE_FFLUSH_UNLOCKED 1
| #define HAVE_FGETC_UNLOCKED 1
| #define HAVE_FGETS_UNLOCKED 1
| #define HAVE_FILENO_UNLOCKED 1
| #define HAVE_FPUTC_UNLOCKED 1
| #define HAVE_FPUTS_UNLOCKED 1
| #define HAVE_FREAD_UNLOCKED 1
| #define HAVE_FWRITE_UNLOCKED 1
| #define HAVE_GETCHAR_UNLOCKED 1
| #define HAVE_GETC_UNLOCKED 1
| #define HAVE_PUTCHAR_UNLOCKED 1
| #define HAVE_PUTC_UNLOCKED 1
| #define HAVE_DECL_ABORT 1
| #define HAVE_DECL_ASPRINTF 1
| /* end confdefs.h.  */
| #include <stdio.h>
| #ifdef HAVE_SYS_TYPES_H
| # include <sys/types.h>
| #endif
| #ifdef HAVE_SYS_STAT_H
| # include <sys/stat.h>
| #endif
| #ifdef STDC_HEADERS
| # include <stdlib.h>
| # include <stddef.h>
| #else
| # ifdef HAVE_STDLIB_H
| #  include <stdlib.h>
| # endif
| #endif
| #ifdef HAVE_STRING_H
| # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
| #  include <memory.h>
| # endif
| # include <string.h>
| #endif
| #ifdef HAVE_STRINGS_H
| # include <strings.h>
| #endif
| #ifdef HAVE_INTTYPES_H
| # include <inttypes.h>
| #endif
| #ifdef HAVE_STDINT_H
| # include <stdint.h>
| #endif
| #ifdef HAVE_UNISTD_H
| # include <unistd.h>
| #endif
| int
| main ()
| {
| #ifndef basename
|   (void) basename;
| #endif
|
|   ;
|   return 0;
| }
configure:5483: result: no

Reply via email to