1216615Slstewart/* This file is automatically generated.  DO NOT EDIT! */
2216615Slstewart/* Generated from: NetBSD: mknative-gdb,v 1.16 2023/07/31 17:09:59 christos Exp  */
3216615Slstewart/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp  */
4216615Slstewart
5216615Slstewart/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
6216615Slstewart/* Memory allocation on the stack.
7220560Slstewart
8220560Slstewart   Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
9220560Slstewart   Inc.
10216615Slstewart
11216615Slstewart   This file is free software: you can redistribute it and/or modify
12216615Slstewart   it under the terms of the GNU Lesser General Public License as
13216615Slstewart   published by the Free Software Foundation; either version 2.1 of the
14216615Slstewart   License, or (at your option) any later version.
15216615Slstewart
16216615Slstewart   This file is distributed in the hope that it will be useful,
17216615Slstewart   but WITHOUT ANY WARRANTY; without even the implied warranty of
18216615Slstewart   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19216615Slstewart   GNU Lesser General Public License for more details.
20216615Slstewart
21216615Slstewart   You should have received a copy of the GNU Lesser General Public License
22216615Slstewart   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
23216615Slstewart
24216615Slstewart/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
25216615Slstewart   means there is a real alloca function.  */
26216615Slstewart#ifndef _GL_ALLOCA_H
27216615Slstewart#define _GL_ALLOCA_H
28216615Slstewart
29216615Slstewart/* alloca (N) returns a pointer to N bytes of memory
30216615Slstewart   allocated on the stack, which will last until the function returns.
31216615Slstewart   Use of alloca should be avoided:
32216615Slstewart     - inside arguments of function calls - undefined behaviour,
33216615Slstewart     - in inline functions - the allocation may actually last until the
34216615Slstewart       calling function returns,
35216615Slstewart     - for huge N (say, N >= 65536) - you never know how large (or small)
36216615Slstewart       the stack is, and when the stack cannot fulfill the memory allocation
37216615Slstewart       request, the program just crashes.
38216615Slstewart */
39216615Slstewart
40216615Slstewart#ifndef alloca
41216615Slstewart  /* Some version of mingw have an <alloca.h> that causes trouble when
42216615Slstewart     included after 'alloca' gets defined as a macro.  As a workaround,
43216615Slstewart     include this <alloca.h> first and define 'alloca' as a macro afterwards
44216615Slstewart     if needed.  */
45216615Slstewart# if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && 0
46216615Slstewart#  include_next <alloca.h>
47216615Slstewart# endif
48216615Slstewart#endif
49216615Slstewart#ifndef alloca
50216615Slstewart# if defined __GNUC__ || (__clang_major__ >= 4)
51216615Slstewart#  define alloca __builtin_alloca
52216615Slstewart# elif defined _AIX
53216615Slstewart#  define alloca __alloca
54216615Slstewart# elif defined _MSC_VER
55216615Slstewart#  include <malloc.h>
56216615Slstewart#  define alloca _alloca
57216615Slstewart# elif defined __DECC && defined __VMS
58216615Slstewart#  define alloca __ALLOCA
59216615Slstewart# elif defined __TANDEM && defined _TNS_E_TARGET
60216615Slstewart#  ifdef  __cplusplus
61216615Slstewartextern "C"
62216615Slstewart#  endif
63216615Slstewartvoid *_alloca (unsigned short);
64216615Slstewart#  pragma intrinsic (_alloca)
65216615Slstewart#  define alloca _alloca
66216615Slstewart# elif defined __MVS__
67216615Slstewart#  include <stdlib.h>
68216615Slstewart# else
69216615Slstewart#  include <stddef.h>
70216615Slstewart#  ifdef  __cplusplus
71216615Slstewartextern "C"
72216615Slstewart#  endif
73216615Slstewartvoid *alloca (size_t);
74216615Slstewart# endif
75216615Slstewart#endif
76216615Slstewart
77216615Slstewart#endif /* _GL_ALLOCA_H */
78216615Slstewart