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