summaryrefslogtreecommitdiffstats
path: root/gl/alloca.in.h
diff options
context:
space:
mode:
authorRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-08-23 19:42:51 +0200
committerRincewindsHat <12514511+RincewindsHat@users.noreply.github.com>2022-09-14 11:08:55 +0200
commit868beb15ae02c352005a2df8857f4ebb9bd758fd (patch)
tree0dc6e6a91c4ef0f131ca82a777e6ac2ad193c399 /gl/alloca.in.h
parentb89aee56964f7d933f2da5f371e32b4d7db9410b (diff)
downloadmonitoring-plugins-868beb15ae02c352005a2df8857f4ebb9bd758fd.tar.gz
Sync with the latest Gnulib code (d27c820595)
Diffstat (limited to 'gl/alloca.in.h')
-rw-r--r--gl/alloca.in.h35
1 files changed, 22 insertions, 13 deletions
diff --git a/gl/alloca.in.h b/gl/alloca.in.h
index 72d28ee3..e2b14613 100644
--- a/gl/alloca.in.h
+++ b/gl/alloca.in.h
@@ -1,22 +1,20 @@
1/* Memory allocation on the stack. 1/* Memory allocation on the stack.
2 2
3 Copyright (C) 1995, 1999, 2001-2004, 2006-2013 Free Software Foundation, 3 Copyright (C) 1995, 1999, 2001-2004, 2006-2022 Free Software Foundation,
4 Inc. 4 Inc.
5 5
6 This program is free software; you can redistribute it and/or modify it 6 This file is free software: you can redistribute it and/or modify
7 under the terms of the GNU General Public License as published 7 it under the terms of the GNU Lesser General Public License as
8 by the Free Software Foundation; either version 3, or (at your option) 8 published by the Free Software Foundation; either version 2.1 of the
9 any later version. 9 License, or (at your option) any later version.
10 10
11 This program is distributed in the hope that it will be useful, 11 This file is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of 12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 General Public License for more details. 14 GNU Lesser General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public 16 You should have received a copy of the GNU Lesser General Public License
17 License along with this program; if not, see 17 along with this program. If not, see <https://www.gnu.org/licenses/>. */
18 <http://www.gnu.org/licenses/>.
19 */
20 18
21/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H 19/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
22 means there is a real alloca function. */ 20 means there is a real alloca function. */
@@ -35,7 +33,16 @@
35 */ 33 */
36 34
37#ifndef alloca 35#ifndef alloca
38# ifdef __GNUC__ 36 /* Some version of mingw have an <alloca.h> that causes trouble when
37 included after 'alloca' gets defined as a macro. As a workaround,
38 include this <alloca.h> first and define 'alloca' as a macro afterwards
39 if needed. */
40# if defined __GNUC__ && (defined _WIN32 && ! defined __CYGWIN__) && @HAVE_ALLOCA_H@
41# include_next <alloca.h>
42# endif
43#endif
44#ifndef alloca
45# if defined __GNUC__ || (__clang_major__ >= 4)
39# define alloca __builtin_alloca 46# define alloca __builtin_alloca
40# elif defined _AIX 47# elif defined _AIX
41# define alloca __alloca 48# define alloca __alloca
@@ -51,6 +58,8 @@ extern "C"
51void *_alloca (unsigned short); 58void *_alloca (unsigned short);
52# pragma intrinsic (_alloca) 59# pragma intrinsic (_alloca)
53# define alloca _alloca 60# define alloca _alloca
61# elif defined __MVS__
62# include <stdlib.h>
54# else 63# else
55# include <stddef.h> 64# include <stddef.h>
56# ifdef __cplusplus 65# ifdef __cplusplus