X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Fmalloc.m4;h=4c182b4140650efaf2c340b60d0ef833cd69d4b8;hb=92249085071a973e2c0621b0415b93d2e48bb00d;hp=8fa48e93bc2cbcb29e6852ef85cdf9f60becad2c;hpb=4ee107046a0ffd91f6c60c787326a5e27b799f6d;p=debian%2Fgzip diff --git a/m4/malloc.m4 b/m4/malloc.m4 index 8fa48e9..4c182b4 100644 --- a/m4/malloc.m4 +++ b/m4/malloc.m4 @@ -1,13 +1,13 @@ -# malloc.m4 serial 14 -dnl Copyright (C) 2007, 2009-2012 Free Software Foundation, Inc. +# malloc.m4 serial 17 +dnl Copyright (C) 2007, 2009-2018 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. m4_version_prereq([2.70], [] ,[ -# This is taken from the following Autoconf patch: -# http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=7fbb553727ed7e0e689a17594b58559ecf3ea6e9 +# This is adapted with modifications from upstream Autoconf here: +# https://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=04be2b7a29d65d9a08e64e8e56e594c91749598c AC_DEFUN([_AC_FUNC_MALLOC_IF], [ AC_REQUIRE([AC_HEADER_STDC])dnl @@ -23,13 +23,16 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF], char *malloc (); #endif ]], - [[return ! malloc (0);]]) + [[char *p = malloc (0); + int result = !p; + free (p); + return result;]]) ], [ac_cv_func_malloc_0_nonnull=yes], [ac_cv_func_malloc_0_nonnull=no], [case "$host_os" in # Guess yes on platforms where we know the result. - *-gnu* | freebsd* | netbsd* | openbsd* \ + *-gnu* | gnu* | freebsd* | netbsd* | openbsd* \ | hpux* | solaris* | cygwin* | mingw*) ac_cv_func_malloc_0_nonnull=yes ;; # If we don't know, assume the worst. @@ -88,7 +91,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX], AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( [[]], - [[#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ + [[#if defined _WIN32 && ! defined __CYGWIN__ choke me #endif ]])],