+2011-10-27 Bruno Haible <bruno@clisp.org>
+
+ utimensat: Work around problem on Linux/hppa.
+ * lib/utimensat.c (rpl_utimensat) [Linux/hppa]: Reject invalid tv_nsec
+ values.
+ * doc/posix-functions/utimensat.texi: Mention the problem on Linux/hppa.
+
2011-10-25 Jim Meyering <meyering@redhat.com>
maint.mk: fix a bug in sc_prohibit_stddef_without_use
When using @code{UTIME_OMIT} for the modification time, but specifying
an access time, some systems fail to update the change time:
Linux kernel 2.6.32.
+@item
+Out-of-range values of @code{tv_nsec} do not lead to a failure on some
+platforms:
+Linux kernel 2.6.22.19 on hppa.
@end itemize
Portability problems not fixed by Gnulib:
ts[1] = times[1];
times = ts;
}
+# ifdef __hppa__
+ /* Linux kernel 2.6.22.19 on hppa does not reject invalid tv_nsec
+ values. */
+ else if (times
+ && ((times[0].tv_nsec != UTIME_NOW
+ && (times[0].tv_nsec < 0
+ || times[0].tv_nsec >= 1000000000))
+ || (times[1].tv_nsec != UTIME_NOW
+ && (times[1].tv_nsec < 0
+ || times[1].tv_nsec >= 1000000000))))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+# endif
# endif /* __linux__ */
result = utimensat (fd, file, times, flag);
/* Linux kernel 2.6.25 has a bug where it returns EINVAL for