X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=m4%2Futimes.m4;h=e6d6f776499329fe76839f655ad97b1378320406;hb=6a1bef0f0a7aa43a4bd49fceef0cc44f489d7706;hp=7efb2b026c9ddf2bf9b4075ff1672e299f24d7ec;hpb=e7921f54c622e3b32e525f345bc34308821e4ae0;p=debian%2Fgzip diff --git a/m4/utimes.m4 b/m4/utimes.m4 index 7efb2b0..e6d6f77 100644 --- a/m4/utimes.m4 +++ b/m4/utimes.m4 @@ -1,6 +1,7 @@ # Detect some bugs in glibc's implementation of utimes. +# serial 2 -dnl Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. +dnl Copyright (C) 2003-2005, 2009-2010 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. @@ -19,8 +20,8 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_UTIMES], [ - AC_CACHE_CHECK([determine whether the utimes function works], - gl_cv_func_working_utimes, + AC_CACHE_CHECK([whether the utimes function works], + [gl_cv_func_working_utimes], [ AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include @@ -44,11 +45,11 @@ main () int fd; int ok = ((f = fopen (file, "w")) - && fclose (f) == 0 - && utimes (file, timeval) == 0 - && lstat (file, &sbuf) == 0 - && sbuf.st_atime == timeval[0].tv_sec - && sbuf.st_mtime == timeval[1].tv_sec); + && fclose (f) == 0 + && utimes (file, timeval) == 0 + && lstat (file, &sbuf) == 0 + && sbuf.st_atime == timeval[0].tv_sec + && sbuf.st_mtime == timeval[1].tv_sec); unlink (file); if (!ok) exit (1); @@ -66,8 +67,8 @@ main () exit (1); ok = (0 <= (fd = open (file, O_WRONLY|O_CREAT, 0444)) - && close (fd) == 0 - && utimes (file, NULL) == 0); + && close (fd) == 0 + && utimes (file, NULL) == 0); unlink (file); exit (!ok); @@ -78,6 +79,6 @@ main () [gl_cv_func_working_utimes=no])]) if test $gl_cv_func_working_utimes = yes; then - AC_DEFINE([HAVE_WORKING_UTIMES], 1, [Define if utimes works properly. ]) + AC_DEFINE([HAVE_WORKING_UTIMES], [1], [Define if utimes works properly. ]) fi ])