X-Git-Url: https://git.cworth.org/git?p=tar;a=blobdiff_plain;f=m4%2Futimes.m4;fp=m4%2Futimes.m4;h=e6d6f776499329fe76839f655ad97b1378320406;hp=5b010acd8b3192191fb6491b2c519837cefd0b44;hb=22f1eb8bc17e5be72dd23d42d6aaa60196ac22e6;hpb=00fa13ff3f2d5b6e2a94c5e948c38616ff7ad37a diff --git a/m4/utimes.m4 b/m4/utimes.m4 index 5b010ac..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, 2009 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);