Edje: update declaration of alloca

SVN revision: 68107
This commit is contained in:
Vincent Torri 2012-02-18 14:25:45 +00:00
parent a7de07d0ce
commit e9f9802c48
2 changed files with 43 additions and 20 deletions

View File

@ -2,21 +2,30 @@
# include "config.h" # include "config.h"
#endif #endif
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H #ifdef HAVE_ALLOCA_H
# include <alloca.h> # include <alloca.h>
#elif defined __GNUC__ #elif !defined alloca
# define alloca __builtin_alloca # ifdef __GNUC__
#elif defined _AIX # define alloca __builtin_alloca
# define alloca __alloca # elif defined _AIX
#elif defined _MSC_VER # define alloca __alloca
# include <malloc.h> # elif defined _MSC_VER
# define alloca _alloca # include <malloc.h>
#else # define alloca _alloca
# include <stddef.h> # elif !defined HAVE_ALLOCA
# ifdef __cplusplus # ifdef __cplusplus
extern "C" extern "C"
# endif # endif
void *alloca (size_t); void *alloca (size_t);
# endif
#endif #endif
#include <string.h> #include <string.h>

View File

@ -9,18 +9,30 @@
# define _GNU_SOURCE # define _GNU_SOURCE
#endif #endif
#ifdef STDC_HEADERS
# include <stdlib.h>
# include <stddef.h>
#else
# ifdef HAVE_STDLIB_H
# include <stdlib.h>
# endif
#endif
#ifdef HAVE_ALLOCA_H #ifdef HAVE_ALLOCA_H
# include <alloca.h> # include <alloca.h>
#elif defined __GNUC__ #elif !defined alloca
# define alloca __builtin_alloca # ifdef __GNUC__
#elif defined _AIX # define alloca __builtin_alloca
# define alloca __alloca # elif defined _AIX
#elif defined _MSC_VER # define alloca __alloca
# include <malloc.h> # elif defined _MSC_VER
# define alloca _alloca # include <malloc.h>
#else # define alloca _alloca
# include <stddef.h> # elif !defined HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
void *alloca (size_t); void *alloca (size_t);
# endif
#endif #endif
#include <string.h> #include <string.h>
@ -35,6 +47,8 @@ void *alloca (size_t);
# include <unistd.h> # include <unistd.h>
#endif #endif
#include <fcntl.h>
#include <lua.h> #include <lua.h>
#include <lualib.h> #include <lualib.h>
#include <lauxlib.h> #include <lauxlib.h>