Rename sys_stat_.h to sys_stat.in.h.
[gnulib.git] / m4 / free.m4
index 537fb89..566734b 100644 (file)
@@ -1,12 +1,9 @@
 # Check whether free (NULL) is supposed to work.
 
-# Copyright (C) 2003 Free Software Foundation, Inc.
-
-# This file is free software, distributed under the terms of the GNU
-# General Public License.  As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
+# Copyright (C) 2003, 2004, 2005 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.
 
 # Written by Paul Eggert.
 
 
 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 <unistd.h>
-           @%:@endif]],
+         [[@%:@include <unistd.h>]],
          [[@%:@if _POSIX_VERSION < 199009L && \
                (defined unix || defined _unix || defined _unix_ \
                 || defined __unix || defined __unix__)
@@ -35,7 +29,7 @@ AC_DEFUN([gl_FUNC_FREE],
        [gl_cv_func_free=yes],
        [gl_cv_func_free=no])])
 
-  if test $gl_cv_func_free = yes; then
+  if test $gl_cv_func_free = no; then
     AC_LIBOBJ(free)
     AC_DEFINE(free, rpl_free,
       [Define to rpl_free if the replacement function should be used.])