diff --git a/ChangeLog b/ChangeLog index 8a7c07555..92849f62f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,12 @@ * Source/NSPathUtilities.m (_POSIX_PTHREAD_SEMANTICS): Define to expose POSIX compliant signatures for get(pw/gr)(nam/uid)_r. + + * Headers/Additions/GNUstepBase/config.h.in, configure.ac (alloca.h): + Check for header. + * configure: Regenerate. + * Source/mframe.m, Source/cifframe.m, Source/NSConnection.m, + Source/callframe.m, Source/GSFormat.m: Include alloca.h where available. 2007-12-20 David Ayers diff --git a/Headers/Additions/GNUstepBase/config.h.in b/Headers/Additions/GNUstepBase/config.h.in index 669214b76..c80e881c2 100644 --- a/Headers/Additions/GNUstepBase/config.h.in +++ b/Headers/Additions/GNUstepBase/config.h.in @@ -313,6 +313,9 @@ /* Define if your Obj-C compiler calls +load methods before main */ #undef HAVE_LOAD_METHOD +/* Define to 1 if you have the header file. */ +#undef HAVE_ALLOCA_H + /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H diff --git a/Source/GSFormat.m b/Source/GSFormat.m index f07f27839..18255d67b 100644 --- a/Source/GSFormat.m +++ b/Source/GSFormat.m @@ -48,10 +48,14 @@ #ifdef HAVE_STDINT_H #include #endif +#ifdef HAVE_ALLOCA_H +#include +#endif #include #include #include + #import "GNUstepBase/preface.h" #import "Foundation/NSString.h" #import "Foundation/NSArray.h" diff --git a/Source/NSConnection.m b/Source/NSConnection.m index 02152ae74..82b9e5c20 100644 --- a/Source/NSConnection.m +++ b/Source/NSConnection.m @@ -30,6 +30,10 @@ */ #import "config.h" +#ifdef HAVE_ALLOCA_H +#include +#endif + #import "Foundation/NSEnumerator.h" #import "GNUstepBase/preface.h" #import "GNUstepBase/GSLock.h" diff --git a/Source/callframe.m b/Source/callframe.m index cc498b4bc..67e607e8a 100644 --- a/Source/callframe.m +++ b/Source/callframe.m @@ -25,6 +25,10 @@ #include "config.h" #include +#ifdef HAVE_ALLOCA_H +#include +#endif + #include "callframe.h" #include "Foundation/NSException.h" #include "Foundation/NSData.h" diff --git a/Source/cifframe.m b/Source/cifframe.m index 0a621ac77..05511dcac 100644 --- a/Source/cifframe.m +++ b/Source/cifframe.m @@ -25,6 +25,10 @@ #include "config.h" #include +#ifdef HAVE_ALLOCA_H +#include +#endif + #include "cifframe.h" #include "Foundation/NSException.h" #include "Foundation/NSData.h" diff --git a/Source/mframe.m b/Source/mframe.m index 403a15bb0..0ce1e12e5 100644 --- a/Source/mframe.m +++ b/Source/mframe.m @@ -34,14 +34,13 @@ #include "config.h" #include "GNUstepBase/preface.h" -#include -#include "Foundation/NSObjCRuntime.h" -#include "Foundation/NSData.h" -#include "Foundation/NSException.h" -#include "Foundation/NSDebug.h" +#ifdef HAVE_ALLOCA_H +#include +#endif #include #include #include +#include /* Deal with strrchr: */ #if STDC_HEADERS || defined(HAVE_STRING_H) @@ -60,6 +59,11 @@ /* memory.h and strings.h conflict on some systems. */ #endif /* not STDC_HEADERS and not HAVE_STRING_H */ +#include "Foundation/NSObjCRuntime.h" +#include "Foundation/NSData.h" +#include "Foundation/NSException.h" +#include "Foundation/NSDebug.h" + /* For encoding and decoding the method arguments, we have to know where diff --git a/configure b/configure index 2300c5c3e..ecb3a1450 100755 --- a/configure +++ b/configure @@ -9732,7 +9732,8 @@ fi -for ac_header in string.h memory.h + +for ac_header in string.h memory.h alloca.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/configure.ac b/configure.ac index e5e70cd2a..947b493b9 100644 --- a/configure.ac +++ b/configure.ac @@ -1316,7 +1316,7 @@ AC_C_INLINE # Following header checks needed for bzero in Storage.m and other places #-------------------------------------------------------------------- AC_HEADER_STDC -AC_CHECK_HEADERS(string.h memory.h) +AC_CHECK_HEADERS(string.h memory.h alloca.h) #-------------------------------------------------------------------- # Following header check needed NSConnection.h