eina - alloca.h - include stdlib and stddef, usze size_t not long
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 15 Jun 2016 04:08:52 +0000 (13:08 +0900)
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>
Wed, 15 Jun 2016 05:33:56 +0000 (14:33 +0900)
src/lib/eina/eina_alloca.h

index 4eb60f0..9339c68 100644 (file)
  */
 
 #ifndef EINA_ALLOCA_H
-#define EINA_ALLOCA_H
+# define EINA_ALLOCA_H
+
+# include <stdlib.h>
+# include <stddef.h>
 
 /**
  * @file eina_alloca.h
  * 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 */