From: Bruno Haible Date: Wed, 31 Oct 2001 20:44:25 +0000 (+0000) Subject: More portability stuff. X-Git-Tag: v0.11~360 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15a343197fd122ffc1b0d37a2761072bd3b57a3e;p=thirdparty%2Fgettext.git More portability stuff. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 1fb52a9bf..a457b06d1 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -10,6 +10,8 @@ * wait-process.c (EXIT_FAILURE): Likewise. * xerror.c (EXIT_FAILURE): Likewise. (xasprintf): Use VA_START instead of va_start. + * javacomp.c: Include alloca() declaration stuff. + * javaexec.c: Likewise. 2001-10-28 Bruno Haible diff --git a/lib/javacomp.c b/lib/javacomp.c index 556bffed8..d2f9e173d 100644 --- a/lib/javacomp.c +++ b/lib/javacomp.c @@ -37,6 +37,32 @@ #include "error.h" #include "libgettext.h" +#ifdef __GNUC__ +# ifndef alloca +# define alloca __builtin_alloca +# endif +#else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifdef __hpux /* This section must match that of bison generated files. */ +# ifdef __cplusplus +extern "C" void *alloca (unsigned int); +# else /* not __cplusplus */ +void *alloca (); +# endif /* not __cplusplus */ +# else /* not __hpux */ +# ifndef alloca +char *alloca (); +# endif +# endif /* __hpux */ +# endif +# endif +#endif + #define _(str) gettext (str) diff --git a/lib/javaexec.c b/lib/javaexec.c index 4d473933b..79682ee7b 100644 --- a/lib/javaexec.c +++ b/lib/javaexec.c @@ -34,6 +34,32 @@ #include "error.h" #include "libgettext.h" +#ifdef __GNUC__ +# ifndef alloca +# define alloca __builtin_alloca +# endif +#else +# if HAVE_ALLOCA_H +# include +# else +# ifdef _AIX + #pragma alloca +# else +# ifdef __hpux /* This section must match that of bison generated files. */ +# ifdef __cplusplus +extern "C" void *alloca (unsigned int); +# else /* not __cplusplus */ +void *alloca (); +# endif /* not __cplusplus */ +# else /* not __hpux */ +# ifndef alloca +char *alloca (); +# endif +# endif /* __hpux */ +# endif +# endif +#endif + #define _(str) gettext (str)