X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=m4%2Ffree.m4;h=24bbbb184f195064392219e827ac19ffc26a1c14;hb=c8228c7d1f864908fd64cd47eefb418e419da549;hp=99ebc9ae994303f9137806fb7c0c29ac48c9fb7e;hpb=44d7c1c1f004fa9bfb8ec3948de2671a7958cf5b;p=pspp diff --git a/m4/free.m4 b/m4/free.m4 index 99ebc9ae99..24bbbb184f 100644 --- a/m4/free.m4 +++ b/m4/free.m4 @@ -1,6 +1,6 @@ # Check whether free (NULL) is supposed to work. -# Copyright (C) 2003, 2004 Free Software Foundation, Inc. +# Copyright (C) 2003-2005, 2009-2011 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,25 +16,21 @@ AC_DEFUN([gl_FUNC_FREE], [ - AC_CHECK_HEADERS_ONCE(unistd.h) AC_CACHE_CHECK([whether free (NULL) is known to work], [gl_cv_func_free], [AC_COMPILE_IFELSE( [AC_LANG_PROGRAM( - [[@%:@if HAVE_UNISTD_H - @%:@include - @%:@endif]], - [[@%:@if _POSIX_VERSION < 199009L && \ - (defined unix || defined _unix || defined _unix_ \ - || defined __unix || defined __unix__) - @%:@error "'free (NULL)' is not known to work" - @%:@endif]])], + [[@%:@include ]], + [[@%:@if _POSIX_VERSION < 199009L && \ + (defined unix || defined _unix || defined _unix_ \ + || defined __unix || defined __unix__) + @%:@error "'free (NULL)' is not known to work" + @%:@endif]])], [gl_cv_func_free=yes], [gl_cv_func_free=no])]) if test $gl_cv_func_free = no; then - AC_LIBOBJ(free) - AC_DEFINE(free, rpl_free, + AC_DEFINE([free], [rpl_free], [Define to rpl_free if the replacement function should be used.]) fi ])