This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH to gcc/configure.ac: check for asprintf


Hi,

  We were forgetting to tell libiberty.h whether asprintf() has a
declaration or not.  Consequently, libiberty.h was trying to provide a
declaration, which most of the time mismatches that available on GNU
systems.  Caught while building the compiler with a C++ compiler.
Fixed with this patchlet.
OK to install?

-- Gaby

2005-05-29  Gabriel Dos Reis  <gdr@integrable-solutions.net>
 
 	* configure.ac: Check declaration for asprintf, needed by
 	libiberty.h. 
 	* configure: Regenerate.
	* config.in: Likewise.

Index: config.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.in,v
retrieving revision 1.213
diff -p -r1.213 config.in
*** config.in	25 May 2005 00:15:03 -0000	1.213
--- config.in	29 May 2005 17:20:44 -0000
***************
*** 296,301 ****
--- 296,308 ----
  #endif
  
  
+ /* Define to 1 if we found a declaration for 'asprintf', otherwise define to
+    0. */
+ #ifndef USED_FOR_TARGET
+ #undef HAVE_DECL_ASPRINTF
+ #endif
+ 
+ 
  /* Define to 1 if we found a declaration for 'atof', otherwise define to 0. */
  #ifndef USED_FOR_TARGET
  #undef HAVE_DECL_ATOF
Index: configure
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure,v
retrieving revision 1.906
diff -p -r1.906 configure
*** configure	25 May 2005 00:15:04 -0000	1.906
--- configure	29 May 2005 17:20:45 -0000
*************** CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/
*** 11205,11211 ****
  
  
  
! for ac_func in getenv atol sbrk abort atof getcwd getwd strsignal \
  	strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \
  	free basename getopt clock getpagesize clearerr_unlocked feof_unlocked   ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked   putchar_unlocked putc_unlocked
  do
--- 11205,11212 ----
  
  
  
! 
! for ac_func in getenv atol asprintf sbrk abort atof getcwd getwd strsignal \
  	strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \
  	free basename getopt clock getpagesize clearerr_unlocked feof_unlocked   ferror_unlocked fflush_unlocked fgetc_unlocked fgets_unlocked   fileno_unlocked fprintf_unlocked fputc_unlocked fputs_unlocked   fread_unlocked fwrite_unlocked getchar_unlocked getc_unlocked   putchar_unlocked putc_unlocked
  do
Index: configure.ac
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.ac,v
retrieving revision 2.113
diff -p -r2.113 configure.ac
*** configure.ac	25 May 2005 00:15:21 -0000	2.113
--- configure.ac	29 May 2005 17:20:46 -0000
*************** AM_LANGINFO_CODESET
*** 1047,1053 ****
  # We will need to find libiberty.h and ansidecl.h
  saved_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
! gcc_AC_CHECK_DECLS(getenv atol sbrk abort atof getcwd getwd strsignal \
  	strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \
  	free basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[
  #include "ansidecl.h"
--- 1047,1053 ----
  # We will need to find libiberty.h and ansidecl.h
  saved_CFLAGS="$CFLAGS"
  CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include"
! gcc_AC_CHECK_DECLS(getenv atol asprintf sbrk abort atof getcwd getwd strsignal \
  	strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \
  	free basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[
  #include "ansidecl.h"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]