alloca-conf.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /* Copyright (C) 2012-2022 Free Software Foundation, Inc.
  2. This program is free software: you can redistribute it and/or modify
  3. it under the terms of the GNU General Public License as published by
  4. the Free Software Foundation; either version 3 of the License, or
  5. (at your option) any later version.
  6. This program is distributed in the hope that it will be useful,
  7. but WITHOUT ANY WARRANTY; without even the implied warranty of
  8. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  9. GNU General Public License for more details.
  10. You should have received a copy of the GNU General Public License
  11. along with this program. If not, see <http://www.gnu.org/licenses/>. */
  12. #include "config.h"
  13. /* This is a merge of code recommended in the autoconf-2.61 documentation
  14. with that recommended in the autoconf-2.13 documentation, with added
  15. tweaks to heed C_ALLOCA. */
  16. #if defined HAVE_ALLOCA_H && !defined C_ALLOCA
  17. # include <alloca.h>
  18. #else
  19. # if defined __GNUC__ && !defined C_ALLOCA
  20. # if !defined alloca
  21. # define alloca __builtin_alloca
  22. # endif
  23. # else
  24. # if defined _AIX
  25. /* Indented so that pre-ansi C compilers will ignore it, rather than
  26. choke on it. Some versions of AIX require this to be the first
  27. thing seen by the compiler except for comments and preprocessor
  28. directives. */
  29. #pragma alloca
  30. # else
  31. # if defined _MSC_VER && !defined C_ALLOCA
  32. # include <malloc.h>
  33. # define alloca _alloca
  34. # else
  35. # if !defined alloca
  36. # if defined __STDC__ || defined __hpux
  37. # if defined HAVE_STDDEF_H
  38. # include <stddef.h>
  39. # if defined __cplusplus
  40. extern "C" void *alloca (size_t);
  41. # else
  42. extern void *alloca (size_t);
  43. # endif
  44. # else
  45. extern void *alloca ();
  46. # endif
  47. # else
  48. extern char *alloca ();
  49. # endif
  50. # endif
  51. # endif
  52. # endif
  53. # endif
  54. #endif