1*fd82c4c4Schristos /* This file is automatically generated. DO NOT EDIT! */ 2*fd82c4c4Schristos /* Generated from: NetBSD: mknative-gdb,v 1.12 2020/09/17 16:54:31 christos Exp */ 3*fd82c4c4Schristos /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ 4*fd82c4c4Schristos 5*fd82c4c4Schristos /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 6*fd82c4c4Schristos /* Memory allocation on the stack. 7*fd82c4c4Schristos 8*fd82c4c4Schristos Copyright (C) 1995, 1999, 2001-2004, 2006-2020 Free Software Foundation, 9*fd82c4c4Schristos Inc. 10*fd82c4c4Schristos 11*fd82c4c4Schristos This program is free software; you can redistribute it and/or modify it 12*fd82c4c4Schristos under the terms of the GNU General Public License as published 13*fd82c4c4Schristos by the Free Software Foundation; either version 3, or (at your option) 14*fd82c4c4Schristos any later version. 15*fd82c4c4Schristos 16*fd82c4c4Schristos This program is distributed in the hope that it will be useful, 17*fd82c4c4Schristos but WITHOUT ANY WARRANTY; without even the implied warranty of 18*fd82c4c4Schristos MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 19*fd82c4c4Schristos General Public License for more details. 20*fd82c4c4Schristos 21*fd82c4c4Schristos You should have received a copy of the GNU General Public 22*fd82c4c4Schristos License along with this program; if not, see 23*fd82c4c4Schristos <https://www.gnu.org/licenses/>. 24*fd82c4c4Schristos */ 25*fd82c4c4Schristos 26*fd82c4c4Schristos /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H 27*fd82c4c4Schristos means there is a real alloca function. */ 28*fd82c4c4Schristos #ifndef _GL_ALLOCA_H 29*fd82c4c4Schristos #define _GL_ALLOCA_H 30*fd82c4c4Schristos 31*fd82c4c4Schristos /* alloca (N) returns a pointer to N bytes of memory 32*fd82c4c4Schristos allocated on the stack, which will last until the function returns. 33*fd82c4c4Schristos Use of alloca should be avoided: 34*fd82c4c4Schristos - inside arguments of function calls - undefined behaviour, 35*fd82c4c4Schristos - in inline functions - the allocation may actually last until the 36*fd82c4c4Schristos calling function returns, 37*fd82c4c4Schristos - for huge N (say, N >= 65536) - you never know how large (or small) 38*fd82c4c4Schristos the stack is, and when the stack cannot fulfill the memory allocation 39*fd82c4c4Schristos request, the program just crashes. 40*fd82c4c4Schristos */ 41*fd82c4c4Schristos 42*fd82c4c4Schristos #ifndef alloca 43*fd82c4c4Schristos /* Some version of mingw have an <alloca.h> that causes trouble when 44*fd82c4c4Schristos included after 'alloca' gets defined as a macro. As a workaround, 45*fd82c4c4Schristos include this <alloca.h> first and define 'alloca' as a macro afterwards 46*fd82c4c4Schristos if needed. */ 47*fd82c4c4Schristos # if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && 0 48*fd82c4c4Schristos # include_next <alloca.h> 49*fd82c4c4Schristos # endif 50*fd82c4c4Schristos #endif 51*fd82c4c4Schristos #ifndef alloca 52*fd82c4c4Schristos # ifdef __GNUC__ 53*fd82c4c4Schristos # define alloca __builtin_alloca 54*fd82c4c4Schristos # elif defined _AIX 55*fd82c4c4Schristos # define alloca __alloca 56*fd82c4c4Schristos # elif defined _MSC_VER 57*fd82c4c4Schristos # include <malloc.h> 58*fd82c4c4Schristos # define alloca _alloca 59*fd82c4c4Schristos # elif defined __DECC && defined __VMS 60*fd82c4c4Schristos # define alloca __ALLOCA 61*fd82c4c4Schristos # elif defined __TANDEM && defined _TNS_E_TARGET 62*fd82c4c4Schristos # ifdef __cplusplus 63*fd82c4c4Schristos extern "C" 64*fd82c4c4Schristos # endif 65*fd82c4c4Schristos void *_alloca (unsigned short); 66*fd82c4c4Schristos # pragma intrinsic (_alloca) 67*fd82c4c4Schristos # define alloca _alloca 68*fd82c4c4Schristos # elif defined __MVS__ 69*fd82c4c4Schristos # include <stdlib.h> 70*fd82c4c4Schristos # else 71*fd82c4c4Schristos # include <stddef.h> 72*fd82c4c4Schristos # ifdef __cplusplus 73*fd82c4c4Schristos extern "C" 74*fd82c4c4Schristos # endif 75*fd82c4c4Schristos void *alloca (size_t); 76*fd82c4c4Schristos # endif 77*fd82c4c4Schristos #endif 78*fd82c4c4Schristos 79*fd82c4c4Schristos #endif /* _GL_ALLOCA_H */ 80