diff --git a/configure.ac b/configure.ac index 1af8ec7e..2e6262fb 100644 --- a/configure.ac +++ b/configure.ac @@ -473,6 +473,7 @@ dnl ###################################################################### AC_C_CONST AC_FUNC_FSEEKO +AC_FUNC_ALLOCA AC_SYS_LARGEFILE AC_TYPE_OFF_T diff --git a/libutils/platform.h b/libutils/platform.h index 80eac96a..ccd3a2bb 100644 --- a/libutils/platform.h +++ b/libutils/platform.h @@ -306,6 +306,24 @@ void globfree(glob_t *pglob); # endif #endif +// from https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/Particular-Functions.html +#if HAVE_ALLOCA_H +# include +#elif defined __GNUC__ +# define alloca __builtin_alloca +#elif defined _AIX +# define alloca __alloca +#elif defined _MSC_VER +# include +# define alloca _alloca +#else +# include +# ifdef __cplusplus +extern "C" +# endif +void *alloca (size_t); +#endif + #include #ifdef HAVE_VFS_H