# HG changeset patch # User Sam Lantinga # Date 1140402615 0 # Node ID 8570e1f4b1f1b191367f9660af714880e591fd49 # Parent d94b080ff6ce9e73f8c4dfdd8eb3365fe440304a On FreeBSD, alloca is defined in stdlib.h diff -r d94b080ff6ce -r 8570e1f4b1f1 include/SDL_stdinc.h --- a/include/SDL_stdinc.h Mon Feb 20 02:09:49 2006 +0000 +++ b/include/SDL_stdinc.h Mon Feb 20 02:30:15 2006 +0000 @@ -27,23 +27,6 @@ #include "SDL_config.h" -/* AIX requires this to be the first thing in the file. */ -#if HAVE_ALLOCA -# if HAVE_ALLOCA_H -# include -# elif __GNUC__ -# define alloca __builtin_alloca -# elif _MSC_VER -# include -# define alloca _alloca -# elif _AIX - #pragma alloca -# else -# ifndef alloca /* predefined by HP cc +Olibcalls */ - char *alloca (); -# endif -# endif -#endif #if HAVE_SYS_TYPES_H #include @@ -173,6 +156,20 @@ extern DECLSPEC void SDLCALL SDL_free(void *mem); #endif +#if HAVE_ALLOCA && !defined(alloca) +# if HAVE_ALLOCA_H +# include +# elif __GNUC__ +# define alloca __builtin_alloca +# elif _MSC_VER +# include +# define alloca _alloca +# elif _AIX + #pragma alloca +# else + char *alloca (); +# endif +#endif #if HAVE_ALLOCA #define SDL_stack_alloc(type, count) (type*)alloca(sizeof(type)*count) #define SDL_stack_free(data)