1193326Sed/* This file is automatically generated.  DO NOT EDIT! */
2193326Sed/* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp  */
3193326Sed/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4193326Sed
5193326Sed/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
6193326Sed/* Memory allocation on the stack.
7193326Sed
8193326Sed   Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
9193326Sed   Inc.
10193326Sed
11193326Sed   This file is free software: you can redistribute it and/or modify
12193326Sed   it under the terms of the GNU Lesser General Public License as
13193326Sed   published by the Free Software Foundation; either version 2.1 of the
14193326Sed   License, or (at your option) any later version.
15208600Srdivacky
16193326Sed   This file is distributed in the hope that it will be useful,
17239462Sdim   but WITHOUT ANY WARRANTY; without even the implied warranty of
18239462Sdim   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19239462Sdim   GNU Lesser General Public License for more details.
20239462Sdim
21239462Sdim   You should have received a copy of the GNU Lesser General Public License
22239462Sdim   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
23249423Sdim
24249423Sdim/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
25249423Sdim   means there is a real alloca function.  */
26249423Sdim#ifndef _GL_ALLOCA_H
27249423Sdim#define _GL_ALLOCA_H
28193326Sed
29193326Sed/* alloca (N) returns a pointer to N bytes of memory
30234353Sdim   allocated on the stack, which will last until the function returns.
31193326Sed   Use of alloca should be avoided:
32234353Sdim     - inside arguments of function calls - undefined behaviour,
33234353Sdim     - in inline functions - the allocation may actually last until the
34234353Sdim       calling function returns,
35234353Sdim     - for huge N (say, N >= 65536) - you never know how large (or small)
36234353Sdim       the stack is, and when the stack cannot fulfill the memory allocation
37234353Sdim       request, the program just crashes.
38234353Sdim */
39234353Sdim
40234353Sdim#ifndef alloca
41234353Sdim  /* Some version of mingw have an <alloca.h> that causes trouble when
42234353Sdim     included after 'alloca' gets defined as a macro.  As a workaround,
43234353Sdim     include this <alloca.h> first and define 'alloca' as a macro afterwards
44234353Sdim     if needed.  */
45234353Sdim# if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && 0
46234353Sdim#  include_next <alloca.h>
47234353Sdim# endif
48234353Sdim#endif
49234353Sdim#ifndef alloca
50234353Sdim# if defined __GNUC__ || (__clang_major__ >= 4)
51234353Sdim#  define alloca __builtin_alloca
52234353Sdim# elif defined _AIX
53234353Sdim#  define alloca __alloca
54234353Sdim# elif defined _MSC_VER
55234353Sdim#  include <malloc.h>
56234353Sdim#  define alloca _alloca
57234353Sdim# elif defined __DECC && defined __VMS
58234353Sdim#  define alloca __ALLOCA
59234353Sdim# elif defined __TANDEM && defined _TNS_E_TARGET
60234353Sdim#  ifdef  __cplusplus
61234353Sdimextern "C"
62193326Sed#  endif
63201361Srdivackyvoid *_alloca (unsigned short);
64193326Sed#  pragma intrinsic (_alloca)
65226633Sdim#  define alloca _alloca
66226633Sdim# elif defined __MVS__
67204643Srdivacky#  include <stdlib.h>
68204643Srdivacky# else
69204962Srdivacky#  include <stddef.h>
70204643Srdivacky#  ifdef  __cplusplus
71204643Srdivackyextern "C"
72204962Srdivacky#  endif
73221345Sdimvoid *alloca (size_t);
74221345Sdim# endif
75193326Sed#endif
76208600Srdivacky
77234353Sdim#endif /* _GL_ALLOCA_H */
78249423Sdim