bug-autoconf
[Top][All Lists]
Advanced

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

Mingw32 build failure for sed 3.1.5


From: Tim Van Holder
Subject: Mingw32 build failure for sed 3.1.5
Date: Fri, 8 Dec 2006 08:35:41 +0100

[if this reaches the autoconf list twice, I apologize; I
originally mistakenly assumed a address@hidden
address existed]

Hi,

when building sed 3.1.5 (cross-compiling from Linux,
but I expect it affects "native" mingw32 builds too) I ran
into the following problem: configure correctly detected
that mingw32 has alloca but no working alloca.h;
however, regex-internal.h simply includes alloca.h
unconditionally, breaking the build.  Replacing the
include by the code the alloca test in configure uses,
things compiled properly:

#ifdef __GNUC__
# define alloca __builtin_alloca
#else
# ifdef _MSC_VER
#  include <malloc.h>
#  define alloca _alloca
# else
#  if HAVE_ALLOCA_H
#   include <alloca.h>
#  else
#   ifdef _AIX
#pragma alloca
#   else
#    ifndef alloca /* predefined by HP cc +Olibcalls */
char *alloca ();
#    endif
#   endif
#  endif
# endif
#endif

I'm cc:ing the autoconf buglist, as this is something
that autoconf should perhaps provide; it could have
a macro that generated a header that was guaranteed
to declare alloca properly (i.e. included config.h and
the above code).  It does not make much sense to
require every package that uses alloca to replicate
this code.




reply via email to

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