From: Zoltan Varga Date: Thu, 2 Dec 2010 13:31:59 +0000 (+0100) Subject: Include alloca.h into glib.h if needed. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=73e34fb96c9e797287dd2bafb4084c58198fedaf;p=mono.git Include alloca.h into glib.h if needed. --- diff --git a/eglib/configure.ac b/eglib/configure.ac index 26a8e58d323..7d52c708efb 100644 --- a/eglib/configure.ac +++ b/eglib/configure.ac @@ -127,6 +127,8 @@ fi AC_SUBST(G_HAVE_ISO_VARARGS) AC_CHECK_HEADERS(getopt.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h) +AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0]) +AC_SUBST(HAVE_ALLOCA_H) if test $ac_cv_sizeof_void_p != $ac_cv_sizeof_int; then GPOINTER_TO_INT="((gint)(long) (ptr))" diff --git a/eglib/src/eglib-config.h.in b/eglib/src/eglib-config.h.in index 03ecbfd129d..7df69197484 100644 --- a/eglib/src/eglib-config.h.in +++ b/eglib/src/eglib-config.h.in @@ -19,6 +19,10 @@ #define GINT_TO_POINTER(v) @GINT_TO_POINTER@ #define GUINT_TO_POINTER(v) @GUINT_TO_POINTER@ +#if @HAVE_ALLOCA_H@ == 1 +#define G_HAVE_ALLOCA_H +#endif + typedef unsigned @GSIZE@ gsize; typedef signed @GSIZE@ gssize; diff --git a/eglib/src/glib.h b/eglib/src/glib.h index 50b61b4cb34..8b6082e83a9 100644 --- a/eglib/src/glib.h +++ b/eglib/src/glib.h @@ -24,6 +24,10 @@ #include #endif +#ifdef G_HAVE_ALLOCA_H +#include +#endif + #ifndef offsetof # define offsetof(s_name,n_name) (size_t)(char *)&(((s_name*)0)->m_name) #endif