bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] vasnprintf include alloca.h unconditionally


From: Bruno Haible
Subject: Re: [bug-gnulib] vasnprintf include alloca.h unconditionally
Date: Fri, 17 Dec 2004 19:48:19 +0100
User-agent: KMail/1.5

Simon Josefsson wrote:
> vasnprintf depend only optionally on alloca, via alloca-opt, but
> include alloca.h unconditionally.  How about this patch?
>
> --- vasnprintf.c      08 Sep 2004 14:31:04 +0200      1.14
> +++ vasnprintf.c      17 Dec 2004 19:04:57 +0100
> @@ -25,7 +25,7 @@
>  #ifdef HAVE_CONFIG_H
>  # include <config.h>
>  #endif
> -#ifndef IN_LIBINTL
> +#if HAVE_ALLOCA
>  # include <alloca.h>
>  #endif

It's not needed, because the module alloca-opt ensures that there will be
an alloca.h file, in the build directory if not in /usr/include.

It's not correct, because in the IN_LIBINTL situation, i.e. when an intl/
directory is compiled [as part of GNU gettext or outside], alloca.h can be
nonexistent even if alloca() as a function exists, and if alloca.h exists,
it is already #included before vasnprintf.c if it exists.

Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]