mirror of
https://github.com/westes/flex.git
synced 2026-01-27 01:44:23 +00:00
reworked alloca() chud, from Francois
This commit is contained in:
parent
f6e85dd40f
commit
96398c4f92
38
parse.y
38
parse.y
@ -42,9 +42,9 @@
|
||||
*/
|
||||
#ifdef YYBISON
|
||||
/* AIX requires this to be the first thing in the file. What a piece. */
|
||||
#ifdef _AIX
|
||||
# ifdef _AIX
|
||||
#pragma alloca
|
||||
#endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include "flexdef.h"
|
||||
@ -53,24 +53,26 @@
|
||||
* so HAVE_ALLOCA_H is (possibly) defined.
|
||||
*/
|
||||
#ifdef YYBISON
|
||||
#ifdef __GNUC__
|
||||
#define alloca __builtin_alloca
|
||||
#else /* not __GNUC__ */
|
||||
#if HAVE_ALLOCA_H
|
||||
#include <alloca.h>
|
||||
#else /* not HAVE_ALLOCA_H */
|
||||
#ifdef __hpux
|
||||
# ifdef __GNUC__
|
||||
# ifndef alloca
|
||||
# define alloca __builtin_alloca
|
||||
# endif
|
||||
# else
|
||||
# if HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
# else
|
||||
# ifdef __hpux
|
||||
void *alloca ();
|
||||
#else /* not __hpux */
|
||||
#ifdef __TURBOC__
|
||||
#include <malloc.h>
|
||||
#else
|
||||
# else
|
||||
# ifdef __TURBOC__
|
||||
# include <malloc.h>
|
||||
# else
|
||||
char *alloca ();
|
||||
#endif /* not __TURBOC__ */
|
||||
#endif /* not __hpux */
|
||||
#endif /* not HAVE_ALLOCA_H */
|
||||
#endif /* not __GNUC__ */
|
||||
#endif /* YYBISON */
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Bletch, ^^^^ that was ugly! */
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user