mirror of https://gerrit.osmocom.org/asn1c
alloca.h is not universally available
This commit is contained in:
parent
0ec6b19a78
commit
619f0cd736
|
@ -92,6 +92,7 @@ AC_SUBST(SKELETONS_CFLAGS)
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS(sys/param.h)
|
AC_CHECK_HEADERS(sys/param.h)
|
||||||
|
AC_CHECK_HEADERS(alloca.h)
|
||||||
|
|
||||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
|
@ -15,13 +15,16 @@
|
||||||
|
|
||||||
#include <stdio.h> /* For snprintf(3) */
|
#include <stdio.h> /* For snprintf(3) */
|
||||||
#include <stdlib.h> /* For *alloc(3) */
|
#include <stdlib.h> /* For *alloc(3) */
|
||||||
#include <alloca.h> /* For alloca(3) */
|
|
||||||
#include <string.h> /* For memcpy(3) */
|
#include <string.h> /* For memcpy(3) */
|
||||||
#include <sys/types.h> /* For size_t */
|
#include <sys/types.h> /* For size_t */
|
||||||
#include <limits.h> /* For LONG_MAX */
|
#include <limits.h> /* For LONG_MAX */
|
||||||
#include <stdarg.h> /* For va_start */
|
#include <stdarg.h> /* For va_start */
|
||||||
#include <stddef.h> /* for offsetof and ptrdiff_t */
|
#include <stddef.h> /* for offsetof and ptrdiff_t */
|
||||||
|
|
||||||
|
#ifdef HAVE_ALLOCA_H
|
||||||
|
#include <alloca.h> /* For alloca(3) */
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
|
|
Loading…
Reference in New Issue