From: Bruno Haible Date: Thu, 19 Jun 2003 17:34:24 +0000 (+0000) Subject: Deal with alloca.h: libintl doesn't have alloca.h. X-Git-Tag: v0.13~426 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e4bdffb80740f8400343c68b7dc029b17abb4df;p=thirdparty%2Fgettext.git Deal with alloca.h: libintl doesn't have alloca.h. --- diff --git a/gettext-runtime/intl/printf.c b/gettext-runtime/intl/printf.c index c96ad2f1d..5d8707433 100644 --- a/gettext-runtime/intl/printf.c +++ b/gettext-runtime/intl/printf.c @@ -21,6 +21,28 @@ # include #endif +#ifdef __GNUC__ +# define alloca __builtin_alloca +# define HAVE_ALLOCA 1 +#else +# ifdef _MSC_VER +# include +# define alloca _alloca +# else +# if defined HAVE_ALLOCA_H || defined _LIBC +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca +char *alloca (); +# endif +# endif +# endif +# endif +#endif + #include #if !HAVE_POSIX_PRINTF diff --git a/gettext-runtime/intl/vasnprintf.c b/gettext-runtime/intl/vasnprintf.c index b8bd3ce85..26106e1a8 100644 --- a/gettext-runtime/intl/vasnprintf.c +++ b/gettext-runtime/intl/vasnprintf.c @@ -26,7 +26,9 @@ #ifdef HAVE_CONFIG_H # include #endif -#include +#ifndef IN_LIBINTL +# include +#endif /* Specification. */ #if WIDE_CHAR_VERSION diff --git a/gettext-runtime/libasprintf/ChangeLog b/gettext-runtime/libasprintf/ChangeLog index a3f00c80b..657e60222 100644 --- a/gettext-runtime/libasprintf/ChangeLog +++ b/gettext-runtime/libasprintf/ChangeLog @@ -6,6 +6,7 @@ * vasnprintf.c: Generalize to it can be compiled for wide strings. (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF, SNPRINTF): New macros. + Don't include if the file is used inside libintl. 2003-05-30 Bruno Haible diff --git a/gettext-runtime/libasprintf/vasnprintf.c b/gettext-runtime/libasprintf/vasnprintf.c index b8bd3ce85..26106e1a8 100644 --- a/gettext-runtime/libasprintf/vasnprintf.c +++ b/gettext-runtime/libasprintf/vasnprintf.c @@ -26,7 +26,9 @@ #ifdef HAVE_CONFIG_H # include #endif -#include +#ifndef IN_LIBINTL +# include +#endif /* Specification. */ #if WIDE_CHAR_VERSION