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-2019 Free Software Foundation,
6    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, see
20    <https://www.gnu.org/licenses/>.
21   */
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    /* Some version of mingw have an <alloca.h> that causes trouble when
42       included after 'alloca' gets defined as a macro.  As a workaround, include
43       this <alloca.h> first and define 'alloca' as a macro afterwards.  */
44 #  if (defined _WIN32 && ! defined __CYGWIN__) && @HAVE_ALLOCA_H@
45 #   include_next <alloca.h>
46 #  endif
47 #  define alloca __builtin_alloca
48 # elif defined _AIX
49 #  define alloca __alloca
50 # elif defined _MSC_VER
51 #  include <malloc.h>
52 #  define alloca _alloca
53 # elif defined __DECC && defined __VMS
54 #  define alloca __ALLOCA
55 # elif defined __TANDEM && defined _TNS_E_TARGET
56 #  ifdef  __cplusplus
57 extern "C"
58 #  endif
59 void *_alloca (unsigned short);
60 #  pragma intrinsic (_alloca)
61 #  define alloca _alloca
62 # elif defined __MVS__
63 #  include <stdlib.h>
64 # else
65 #  include <stddef.h>
66 #  ifdef  __cplusplus
67 extern "C"
68 #  endif
69 void *alloca (size_t);
70 # endif
71 #endif
72 
73 #endif /* _GL_ALLOCA_H */
74