summaryrefslogtreecommitdiffstats
path: root/gl/m4/malloc.m4
diff options
context:
space:
mode:
authorLorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>2024-11-06 08:24:23 (GMT)
committerGitHub <noreply@github.com>2024-11-06 08:24:23 (GMT)
commit9b4df9e50837cc837e113053ba12ee6967d5e6c2 (patch)
treebf989e771579f835bcb49c074637a8e224bcecbc /gl/m4/malloc.m4
parent94150ae347beb25ac369d5773834ceef7f3736d3 (diff)
parent5be04ec2ceb1df77afbca4fcbf9e92a712612d6f (diff)
downloadmonitoring-plugins-9b4df9e50837cc837e113053ba12ee6967d5e6c2.tar.gz
Merge pull request #2037 from RincewindsHat/update/gnulib-1.0
Sync with the latest Gnulib code (d4ec02b3cc) (gnulib v1.0)
Diffstat (limited to 'gl/m4/malloc.m4')
-rw-r--r--gl/m4/malloc.m414
1 files changed, 8 insertions, 6 deletions
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 5540292..41a4693 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,6 @@
1# malloc.m4 serial 28 1# malloc.m4
2dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc. 2# serial 31
3dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
3dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
4dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
5dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
@@ -16,7 +17,8 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
16 [[#include <stdlib.h> 17 [[#include <stdlib.h>
17 ]], 18 ]],
18 [[void *p = malloc (0); 19 [[void *p = malloc (0);
19 int result = !p; 20 void * volatile vp = p;
21 int result = !vp;
20 free (p); 22 free (p);
21 return result;]]) 23 return result;]])
22 ], 24 ],
@@ -25,8 +27,8 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
25 [case "$host_os" in 27 [case "$host_os" in
26 # Guess yes on platforms where we know the result. 28 # Guess yes on platforms where we know the result.
27 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \ 29 *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
28 | gnu* | *-musl* | midnightbsd* \ 30 | gnu* | *-musl* | midipix* | midnightbsd* \
29 | hpux* | solaris* | cygwin* | mingw* | msys* ) 31 | hpux* | solaris* | cygwin* | mingw* | windows* | msys* )
30 ac_cv_func_malloc_0_nonnull="guessing yes" ;; 32 ac_cv_func_malloc_0_nonnull="guessing yes" ;;
31 # If we don't know, obey --enable-cross-guesses. 33 # If we don't know, obey --enable-cross-guesses.
32 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; 34 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
@@ -128,7 +130,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
128 dnl except on those platforms where we have seen 'test-malloc-gnu', 130 dnl except on those platforms where we have seen 'test-malloc-gnu',
129 dnl 'test-realloc-gnu', 'test-calloc-gnu' fail. 131 dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
130 case "$host_os" in 132 case "$host_os" in
131 mingw*) 133 mingw* | windows*)
132 gl_cv_func_malloc_posix=no ;; 134 gl_cv_func_malloc_posix=no ;;
133 irix* | solaris*) 135 irix* | solaris*)
134 dnl On IRIX 6.5, the three functions return NULL with errno unset 136 dnl On IRIX 6.5, the three functions return NULL with errno unset