Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 26 Jun 2003 17:02:23 +0000 (17:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 26 Jun 2003 17:02:23 +0000 (17:02 +0000)
2003-06-26  Ulrich Drepper  <drepper@redhat.com>

* io/test-utime.c: If _STATBUF_ST_NSEC is defined, adjust lower
boundary test to take rounding of nanoseconds into account.

* sysdeps/unix/sysv/linux/bits/stat.h: Define _STATBUF_ST_NSEC.
* sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/m68k/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
* sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.

ChangeLog
io/test-utime.c

index f4c4ec6..779a6f4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2003-06-26  Ulrich Drepper  <drepper@redhat.com>
+
+       * io/test-utime.c: If _STATBUF_ST_NSEC is defined, adjust lower
+       boundary test to take rounding of nanoseconds into account.
+
+       * sysdeps/unix/sysv/linux/bits/stat.h: Define _STATBUF_ST_NSEC.
+       * sysdeps/unix/sysv/linux/ia64/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/m68k/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/powerpc/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/s390/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/sparc/bits/stat.h: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/bits/stat.h: Likewise.
+
 2003-06-26  Andreas Schwab  <schwab@suse.de>
 
        * sysdeps/m68k/fpu/bits/mathinline.h: Don't inline frexp.
index 8e44fa0..24c2871 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1994, 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1994,1996,1997,2000,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -112,7 +112,12 @@ main (int argc, char *argv[])
       return 1;
     }
 
-  if (stnow.st_mtime < now1 || stnow.st_mtime > now2)
+#ifdef _STATBUF_ST_NSEC
+# define CORR (stnow.st_mtim.tv_nsec == 0 ? 0 : 1)
+#else
+# define CORR 0
+#endif
+  if (stnow.st_mtime + CORR < now1 || stnow.st_mtime > now2)
     {
       printf ("modtime %ld <%ld >%ld\n", stnow.st_mtime, now1, now2);
       return 1;