Commit | Line | Data |
---|---|---|
b90efa5b | 1 | /* Copyright (C) 2012-2015 Free Software Foundation, Inc. |
5bf135a7 NC |
2 | |
3 | This program is free software: you can redistribute it and/or modify | |
4 | it under the terms of the GNU General Public License as published by | |
5 | the Free Software Foundation; either version 3 of the License, or | |
6 | (at your option) any later version. | |
7 | ||
8 | This program is distributed in the hope that it will be useful, | |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
11 | GNU General Public License for more details. | |
12 | ||
13 | You should have received a copy of the GNU General Public License | |
14 | along with this program. If not, see <http://www.gnu.org/licenses/>. */ | |
15 | ||
6c26fec9 AM |
16 | #include "config.h" |
17 | ||
8d25cc3d AM |
18 | /* This is a merge of code recommended in the autoconf-2.61 documentation |
19 | with that recommended in the autoconf-2.13 documentation, with added | |
20 | tweaks to heed C_ALLOCA. */ | |
21 | ||
22 | #if defined HAVE_ALLOCA_H && !defined C_ALLOCA | |
23 | # include <alloca.h> | |
24 | #else | |
25 | # if defined __GNUC__ && !defined C_ALLOCA | |
26 | # if !defined alloca | |
27 | # define alloca __builtin_alloca | |
28 | # endif | |
29 | # else | |
30 | # if defined _AIX | |
31 | /* Indented so that pre-ansi C compilers will ignore it, rather than | |
32 | choke on it. Some versions of AIX require this to be the first | |
3cb4feec AM |
33 | thing seen by the compiler except for comments and preprocessor |
34 | directives. */ | |
8d25cc3d | 35 | #pragma alloca |
6c26fec9 | 36 | # else |
8d25cc3d AM |
37 | # if defined _MSC_VER && !defined C_ALLOCA |
38 | # include <malloc.h> | |
39 | # define alloca _alloca | |
40 | # else | |
41 | # if !defined alloca | |
42 | # if defined __STDC__ || defined __hpux | |
43 | # if defined HAVE_STDDEF_H | |
44 | # include <stddef.h> | |
45 | # if defined __cplusplus | |
46 | extern "C" void *alloca (size_t); | |
47 | # else | |
48 | extern void *alloca (size_t); | |
49 | # endif | |
50 | # else | |
51 | extern void *alloca (); | |
52 | # endif | |
53 | # else | |
54 | extern char *alloca (); | |
55 | # endif | |
56 | # endif | |
57 | # endif | |
6c26fec9 | 58 | # endif |
8d25cc3d AM |
59 | # endif |
60 | #endif |