diff include/SDL_stdinc.h @ 1367:e440d5c488c1

Fixes for BeOS and Solaris builds
author Sam Lantinga <slouken@libsdl.org>
date Fri, 17 Feb 2006 08:43:23 +0000
parents 19418e4422cb
children 533567cbb576
line wrap: on
line diff
--- a/include/SDL_stdinc.h	Thu Feb 16 23:32:39 2006 +0000
+++ b/include/SDL_stdinc.h	Fri Feb 17 08:43:23 2006 +0000
@@ -28,15 +28,22 @@
 #include "SDL_config.h"
 
 /* AIX requires this to be the first thing in the file.  */
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+#  include <malloc.h>
+#  define alloca _alloca
 # else
-#  ifdef _AIX
- #pragma alloca
+#  if HAVE_ALLOCA_H
+#   include <alloca.h>
 #  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
+#   ifdef _AIX
+ #pragma alloca
+#   else
+#    ifndef alloca /* predefined by HP cc +Olibcalls */
 char *alloca ();
+#    endif
 #   endif
 #  endif
 # endif