summaryrefslogtreecommitdiff
path: root/lib/utimens.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2013-09-19 14:40:08 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2013-09-19 14:40:08 -0700
commit230fe2a5a10f2bc128f354e3fb1b48536b1f143b (patch)
treeb282d5f242b8ada877d188d03d43da78b175d67a /lib/utimens.c
parentc39cc7d149d28060c40bc206eb8a63f7a0636301 (diff)
downloademacs-230fe2a5a10f2bc128f354e3fb1b48536b1f143b.tar.gz
Merge from gnulib.
This incorporates the following changes: 2013-09-19 stdio: OS X port of putc_unlocked + extern inline 2013-09-19 signal: OS X port of sigaddset etc. + extern inline 2013-09-19 extern-inline: do not always suppress extern inline on OS X 2013-09-17 getgroups: statement without effect 2013-08-28 headers: check that _GL_INLINE_HEADER_BEGIN is defined
Diffstat (limited to 'lib/utimens.c')
-rw-r--r--lib/utimens.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/utimens.c b/lib/utimens.c
index 013843d6da4..44a33c1d791 100644
--- a/lib/utimens.c
+++ b/lib/utimens.c
@@ -90,10 +90,12 @@ validate_timespec (struct timespec timespec[2])
assert (timespec);
if ((timespec[0].tv_nsec != UTIME_NOW
&& timespec[0].tv_nsec != UTIME_OMIT
- && (timespec[0].tv_nsec < 0 || 1000000000 <= timespec[0].tv_nsec))
+ && ! (0 <= timespec[0].tv_nsec
+ && timespec[0].tv_nsec < TIMESPEC_RESOLUTION))
|| (timespec[1].tv_nsec != UTIME_NOW
&& timespec[1].tv_nsec != UTIME_OMIT
- && (timespec[1].tv_nsec < 0 || 1000000000 <= timespec[1].tv_nsec)))
+ && ! (0 <= timespec[1].tv_nsec
+ && timespec[1].tv_nsec < TIMESPEC_RESOLUTION)))
{
errno = EINVAL;
return -1;