Commit | Line | Data |
---|---|---|
6c26fec9 AM |
1 | #include "config.h" |
2 | ||
8d25cc3d AM |
3 | /* This is a merge of code recommended in the autoconf-2.61 documentation |
4 | with that recommended in the autoconf-2.13 documentation, with added | |
5 | tweaks to heed C_ALLOCA. */ | |
6 | ||
7 | #if defined HAVE_ALLOCA_H && !defined C_ALLOCA | |
8 | # include <alloca.h> | |
9 | #else | |
10 | # if defined __GNUC__ && !defined C_ALLOCA | |
11 | # if !defined alloca | |
12 | # define alloca __builtin_alloca | |
13 | # endif | |
14 | # else | |
15 | # if defined _AIX | |
16 | /* Indented so that pre-ansi C compilers will ignore it, rather than | |
17 | choke on it. Some versions of AIX require this to be the first | |
3cb4feec AM |
18 | thing seen by the compiler except for comments and preprocessor |
19 | directives. */ | |
8d25cc3d | 20 | #pragma alloca |
6c26fec9 | 21 | # else |
8d25cc3d AM |
22 | # if defined _MSC_VER && !defined C_ALLOCA |
23 | # include <malloc.h> | |
24 | # define alloca _alloca | |
25 | # else | |
26 | # if !defined alloca | |
27 | # if defined __STDC__ || defined __hpux | |
28 | # if defined HAVE_STDDEF_H | |
29 | # include <stddef.h> | |
30 | # if defined __cplusplus | |
31 | extern "C" void *alloca (size_t); | |
32 | # else | |
33 | extern void *alloca (size_t); | |
34 | # endif | |
35 | # else | |
36 | extern void *alloca (); | |
37 | # endif | |
38 | # else | |
39 | extern char *alloca (); | |
40 | # endif | |
41 | # endif | |
42 | # endif | |
6c26fec9 | 43 | # endif |
8d25cc3d AM |
44 | # endif |
45 | #endif |