alloca: use alloca from <stdlib.h> on NetBSD

The only generally portable way to do this is to use -std=gnu99,
"#include <stdlib.h>", and write "alloca".
__builtin_alloca does not seem to be available on NetBSD
main
Anonymous Maarten 2023-11-22 03:27:24 +01:00 committed by Ozkan Sezer
parent f26a93211f
commit d6291d4d42
1 changed files with 6 additions and 0 deletions

View File

@ -41,6 +41,12 @@
# ifndef alloca
# ifdef HAVE_ALLOCA_H
# include <alloca.h>
# elif defined(__NETBSD__)
# if defined(__STRICT_ANSI__)
# define SDL_DISABLE_ALLOCA
# else
# include <stdlib.h>
# endif
# elif defined(__GNUC__)
# define alloca __builtin_alloca
# elif defined(_MSC_VER)