X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Futimes-null.m4;h=8d5c8aef7f0324ba919808267c9c3c27550868f4;hb=d6067ec16649b3ebb477bd1023ddf48809b78837;hp=76512db6c576048fb5077f541715decde1ce03ec;hpb=23fe10e274cf20fb2cb75ea1da9556a733106657;p=gnulib.git diff --git a/m4/utimes-null.m4 b/m4/utimes-null.m4 index 76512db6c..8d5c8aef7 100644 --- a/m4/utimes-null.m4 +++ b/m4/utimes-null.m4 @@ -1,4 +1,11 @@ -#serial 5 +#serial 7 + +# Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 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. dnl Shamelessly cloned from acspecific.m4's AC_FUNC_UTIME_NULL, dnl then do case-insensitive s/utime/utimes/. @@ -11,13 +18,15 @@ AC_TRY_RUN([ #undef stat #include #include -main() { +#include +int +main () { struct stat s, t; -exit(!(stat ("conftest.data", &s) == 0 - && utimes("conftest.data", (long *)0) == 0 - && stat("conftest.data", &t) == 0 - && t.st_mtime >= s.st_mtime - && t.st_mtime - s.st_mtime < 120)); +return ! (stat ("conftest.data", &s) == 0 + && utimes ("conftest.data", 0) == 0 + && stat ("conftest.data", &t) == 0 + && t.st_mtime >= s.st_mtime + && t.st_mtime - s.st_mtime < 120)); }], ac_cv_func_utimes_null=yes, ac_cv_func_utimes_null=no,