diff options
author | ed <ed@FreeBSD.org> | 2010-03-28 13:16:08 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-03-28 13:16:08 +0000 |
commit | 543b5e901b744468356547ee61975d9d44fa8f32 (patch) | |
tree | 5c6d55680c37f3cbfd9460fbab60d39b1ecb8ae7 /gnu/usr.bin/diff | |
parent | 4f08ecd7ed8b39a0e0cd094967835fa85d105793 (diff) | |
download | FreeBSD-src-543b5e901b744468356547ee61975d9d44fa8f32.zip FreeBSD-src-543b5e901b744468356547ee61975d9d44fa8f32.tar.gz |
Change all our own code to use st_*tim instead of st_*timespec.
Also remove some local patches to diff(1) which are now unneeded.
Diffstat (limited to 'gnu/usr.bin/diff')
-rw-r--r-- | gnu/usr.bin/diff/context.c.diff | 2 | ||||
-rw-r--r-- | gnu/usr.bin/diff/diff.c.diff | 18 |
2 files changed, 1 insertions, 19 deletions
diff --git a/gnu/usr.bin/diff/context.c.diff b/gnu/usr.bin/diff/context.c.diff index ee1ab21..06cfb12 100644 --- a/gnu/usr.bin/diff/context.c.diff +++ b/gnu/usr.bin/diff/context.c.diff @@ -15,7 +15,7 @@ $FreeBSD$ INT_STRLEN_BOUND (time_t) + 11)]; struct tm const *tm = localtime (&inf->stat.st_mtime); - int nsec = TIMESPEC_NS (inf->stat.st_mtim); -+ long nsec = TIMESPEC_NS (inf->stat.st_mtimespec); ++ long nsec = TIMESPEC_NS (inf->stat.st_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long int sec = inf->stat.st_mtime; diff --git a/gnu/usr.bin/diff/diff.c.diff b/gnu/usr.bin/diff/diff.c.diff index 884a9c4..28b90ab 100644 --- a/gnu/usr.bin/diff/diff.c.diff +++ b/gnu/usr.bin/diff/diff.c.diff @@ -49,21 +49,3 @@ $FreeBSD$ output_style = style; } } -@@ -997,7 +1001,7 @@ - #ifdef ST_MTIM_NSEC - - # if HAVE_CLOCK_GETTIME && defined CLOCK_REALTIME -- if (clock_gettime (CLOCK_REALTIME, &st->st_mtim) == 0) -+ if (clock_gettime (CLOCK_REALTIME, &st->st_mtimespec) == 0) - return; - # endif - -@@ -1007,7 +1011,7 @@ - if (gettimeofday (&timeval, 0) == 0) - { - st->st_mtime = timeval.tv_sec; -- st->st_mtim.ST_MTIM_NSEC = timeval.tv_usec * 1000; -+ st->st_mtimespec.ST_MTIM_NSEC = timeval.tv_usec * 1000; - return; - } - } |