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