eina - alloca.h - include stdlib and stddef, usze size_t not long

This commit is contained in:
Carsten Haitzler 2016-06-15 13:08:52 +09:00
parent f33b53e923
commit fe9a9d8759
1 changed files with 19 additions and 16 deletions

View File

@ -17,7 +17,10 @@
*/
#ifndef EINA_ALLOCA_H
#define EINA_ALLOCA_H
# define EINA_ALLOCA_H
# include <stdlib.h>
# include <stddef.h>
/**
* @file eina_alloca.h
@ -25,26 +28,26 @@
* depending on the platform.
*/
#ifdef EINA_HAVE_ALLOCA_H
# include <alloca.h>
#elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined EINA_HAVE_ALLOCA
# ifdef __cplusplus
# ifdef EINA_HAVE_ALLOCA_H
# include <alloca.h>
# elif !defined alloca
# ifdef __GNUC__
# define alloca __builtin_alloca
# elif defined _AIX
# define alloca __alloca
# elif defined _MSC_VER
# include <malloc.h>
# define alloca _alloca
# elif !defined EINA_HAVE_ALLOCA
# ifdef __cplusplus
extern "C"
# endif
# endif
/**
* Allocates memory in the stack frame of the caller, so it's automatically
* freed when the caller returns. See alloca(3) for detials.
*/
void *alloca (long);
void *alloca(size_t size);
# endif
# endif
#endif
#endif /* EINA_HAVE_ALLOCA_H */