[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Minor build failure on linux-to-mingw32 cross-compilation
From: |
Tim Van Holder |
Subject: |
Minor build failure on linux-to-mingw32 cross-compilation |
Date: |
Fri, 8 Dec 2006 08:26:11 +0100 |
Hi,
when building sed 3.1.5 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 (unless perhaps if autoscan reported this
and suggested the replacement code).
- Minor build failure on linux-to-mingw32 cross-compilation,
Tim Van Holder <=