1 /* -*- buffer-read-only: t -*- vi: set ro: */ 2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ 3 /* Memory allocation on the stack. 4 5 Copyright (C) 1995, 1999, 2001-2004, 2006-2008 Free Software 6 Foundation, Inc. 7 8 This program is free software; you can redistribute it and/or modify it 9 under the terms of the GNU General Public License as published 10 by the Free Software Foundation; either version 3, or (at your option) 11 any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16 General Public License for more details. 17 18 You should have received a copy of the GNU General Public 19 License along with this program; if not, write to the Free Software 20 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 21 USA. */ 22 23 /* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H 24 means there is a real alloca function. */ 25 #ifndef _GL_ALLOCA_H 26 #define _GL_ALLOCA_H 27 28 /* alloca (N) returns a pointer to N bytes of memory 29 allocated on the stack, which will last until the function returns. 30 Use of alloca should be avoided: 31 - inside arguments of function calls - undefined behaviour, 32 - in inline functions - the allocation may actually last until the 33 calling function returns, 34 - for huge N (say, N >= 65536) - you never know how large (or small) 35 the stack is, and when the stack cannot fulfill the memory allocation 36 request, the program just crashes. 37 */ 38 39 #ifndef alloca 40 # ifdef __GNUC__ 41 # define alloca __builtin_alloca 42 # elif defined _AIX 43 # define alloca __alloca 44 # elif defined _MSC_VER 45 # include <malloc.h> 46 # define alloca _alloca 47 # elif defined __DECC && defined __VMS 48 # define alloca __ALLOCA 49 # else 50 # include <stddef.h> 51 # ifdef __cplusplus 52 extern "C" 53 # endif 54 void *alloca (size_t); 55 # endif 56 #endif 57 58 #endif /* _GL_ALLOCA_H */ 59