From: Eric Botcazou Date: Wed, 13 Apr 2005 09:13:27 +0000 (+0200) Subject: configure.ac (gcc_AC_CHECK_DECLS): Add vsnprintf. X-Git-Tag: misc/cutover-cvs2svn~4117 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=367e83192129b48cad047a38a7b30ee62b9a48af;p=thirdparty%2Fgcc.git configure.ac (gcc_AC_CHECK_DECLS): Add vsnprintf. * configure.ac (gcc_AC_CHECK_DECLS): Add vsnprintf. * configure: Regenerate. * config.in: Likewise. * system.h: Declare vsnprintf if not already declared. From-SVN: r98080 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 82f224c35c7b..c58b34449d6f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2005-04-13 Eric Botcazou + + * configure.ac (gcc_AC_CHECK_DECLS): Add vsnprintf. + * configure: Regenerate. + * config.in: Likewise. + * system.h: Declare vsnprintf if not already declared. + 2005-04-13 Eric Botcazou * optc-gen.awk: Handle stand-alone Mask records. diff --git a/gcc/config.in b/gcc/config.in index 996c2f8ff3b3..6e4026b47104 100644 --- a/gcc/config.in +++ b/gcc/config.in @@ -314,6 +314,10 @@ 0. */ #undef HAVE_DECL_VASPRINTF +/* Define to 1 if we found a declaration for 'vsnprintf', otherwise define to + 0. */ +#undef HAVE_DECL_VSNPRINTF + /* Define to 1 if you have the header file. */ #undef HAVE_DIRECT_H diff --git a/gcc/configure b/gcc/configure index 1d96694c3ab6..98639dbcdb8e 100755 --- a/gcc/configure +++ b/gcc/configure @@ -11179,11 +11179,12 @@ CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/../include" + for ac_func in getenv atol sbrk abort atof getcwd getwd strsignal \ - strstr errno snprintf 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 + 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 ac_tr_decl=`echo "HAVE_DECL_$ac_func" | $as_tr_cpp` echo "$as_me:$LINENO: checking whether $ac_func is declared" >&5 diff --git a/gcc/configure.ac b/gcc/configure.ac index a2239a5819e9..efa758c94640 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1053,8 +1053,8 @@ AM_LANGINFO_CODESET 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 vasprintf malloc realloc calloc free \ - basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[ + strstr errno snprintf vsnprintf vasprintf malloc realloc calloc \ + free basename getopt clock getpagesize gcc_UNLOCKED_FUNCS, , ,[ #include "ansidecl.h" #include "system.h"]) diff --git a/gcc/system.h b/gcc/system.h index 35581a097cc9..720e4dff28c1 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -438,6 +438,10 @@ extern void abort (void); extern int snprintf (char *, size_t, const char *, ...); #endif +#if defined (HAVE_DECL_VSNPRINTF) && !HAVE_DECL_VSNPRINTF +extern int vsnprintf(char *, size_t, const char *, va_list); +#endif + /* 1 if we have C99 designated initializers. */ #if !defined(HAVE_DESIGNATED_INITIALIZERS) #define HAVE_DESIGNATED_INITIALIZERS \