From: Bruno Haible Date: Fri, 20 Jun 2003 12:58:13 +0000 (+0000) Subject: Use our own vasprintf() if the system has a deficient one. X-Git-Tag: v0.13~424 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a09721203c75a8eda374e77f6f6c1468fe904dc0;p=thirdparty%2Fgettext.git Use our own vasprintf() if the system has a deficient one. --- diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index 657e60222..e2e0943e8 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -1,3 +1,11 @@ +2003-06-20 Bruno Haible + + * configure.ac: Invoke gt_PRINTF_POSIX. + * lib-asprintf.h: Ignore an existing vasprintf() if it doesn't support + POSIX/XSI format strings. + * lib-asprintf.c: Likewise. + * Makefile.am (config.h_vms): Define HAVE_POSIX_PRINTF. + 2003-06-19 Bruno Haible * configure.ac (jm_AC_TYPE_LONG_LONG): Replaces gt_TYPE_LONGLONG. diff --git a/gettext-runtime/libasprintf/Makefile.am b/gettext-runtime/libasprintf/Makefile.am index f2cf86bfc..16817693d 100644 --- a/gettext-runtime/libasprintf/Makefile.am +++ b/gettext-runtime/libasprintf/Makefile.am @@ -189,6 +189,7 @@ config.h_vms: config.h.in -e 's/#undef HAVE_LONG_DOUBLE$$/#define HAVE_LONG_DOUBLE 1/' \ -e 's/#undef HAVE_LONG_LONG$$/#define HAVE_LONG_LONG 1/' \ -e 's/#undef HAVE_MEMORY_H$$/#define HAVE_MEMORY_H 1/' \ + -e 's/#undef HAVE_POSIX_PRINTF$$/#define HAVE_POSIX_PRINTF 1/' \ -e 's/#undef HAVE_PTRDIFF_T$$/#define HAVE_PTRDIFF_T 1/' \ -e 's/#undef HAVE_STDLIB_H$$/#define HAVE_STDLIB_H 1/' \ -e 's/#undef HAVE_STRINGS_H$$/#define HAVE_STRINGS_H 1/' \ diff --git a/gettext-runtime/libasprintf/configure.ac b/gettext-runtime/libasprintf/configure.ac index 9d1ed6cac..dec12fbad 100644 --- a/gettext-runtime/libasprintf/configure.ac +++ b/gettext-runtime/libasprintf/configure.ac @@ -69,6 +69,7 @@ AC_EGREP_CPP([Need own alloca], [ AC_SUBST([ALLOCA_H]) AC_CHECK_FUNCS([snprintf vasprintf]) +gt_PRINTF_POSIX dnl Check for tools needed for formatting the documentation. ac_aux_dir_abs=`cd $ac_aux_dir && pwd` diff --git a/gettext-runtime/libasprintf/lib-asprintf.c b/gettext-runtime/libasprintf/lib-asprintf.c index b9569933e..777405fdb 100644 --- a/gettext-runtime/libasprintf/lib-asprintf.c +++ b/gettext-runtime/libasprintf/lib-asprintf.c @@ -1,5 +1,5 @@ /* Library functions for class autosprintf. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002-2003 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software; you can redistribute it and/or modify it @@ -21,7 +21,7 @@ # include #endif -#if !HAVE_VASPRINTF +#if !(HAVE_VASPRINTF && HAVE_POSIX_PRINTF) #define STATIC static diff --git a/gettext-runtime/libasprintf/lib-asprintf.h b/gettext-runtime/libasprintf/lib-asprintf.h index 916e33147..a9cb29064 100644 --- a/gettext-runtime/libasprintf/lib-asprintf.h +++ b/gettext-runtime/libasprintf/lib-asprintf.h @@ -1,5 +1,5 @@ /* Library functions for class autosprintf. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002-2003 Free Software Foundation, Inc. Written by Bruno Haible , 2002. This program is free software; you can redistribute it and/or modify it @@ -21,7 +21,7 @@ # include #endif -#if HAVE_VASPRINTF +#if HAVE_VASPRINTF && HAVE_POSIX_PRINTF /* Get asprintf(), vasprintf() declarations. */ #include