diff options
| author | Xin LI <delphij@FreeBSD.org> | 2007-06-17 00:43:50 +0000 |
|---|---|---|
| committer | Xin LI <delphij@FreeBSD.org> | 2007-06-17 00:43:50 +0000 |
| commit | 9ba2645aa74fceedc99c563631fadcab3ae7e9dc (patch) | |
| tree | 403f794fe1cde4ed73d497563bf3ce54abfb8611 /gnu/usr.bin/diff/context.c.diff | |
| parent | 27d65ef26791ef5368f36d176829e0053e30cfef (diff) | |
Notes
Diffstat (limited to 'gnu/usr.bin/diff/context.c.diff')
| -rw-r--r-- | gnu/usr.bin/diff/context.c.diff | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/gnu/usr.bin/diff/context.c.diff b/gnu/usr.bin/diff/context.c.diff index d7d207320a69..ee1ab21165dd 100644 --- a/gnu/usr.bin/diff/context.c.diff +++ b/gnu/usr.bin/diff/context.c.diff @@ -1,6 +1,6 @@ $FreeBSD$ --- context.c.orig 2004-04-12 15:44:35.000000000 +0800 -+++ context.c 2007-06-15 14:51:05.497679903 +0800 ++++ context.c 2007-06-16 22:25:11.705063242 +0800 @@ -29,7 +29,7 @@ # define TIMESPEC_NS(timespec) 0 #endif @@ -10,7 +10,7 @@ $FreeBSD$ static char const *find_function (char const * const *, lin); static struct change *find_hunk (struct change *); -@@ -57,7 +57,7 @@ +@@ -57,12 +57,12 @@ char buf[MAX (INT_STRLEN_BOUND (int) + 32, INT_STRLEN_BOUND (time_t) + 11)]; struct tm const *tm = localtime (&inf->stat.st_mtime); @@ -18,4 +18,11 @@ $FreeBSD$ + long nsec = TIMESPEC_NS (inf->stat.st_mtimespec); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long int sec = inf->stat.st_mtime; +- long int sec = inf->stat.st_mtime; ++ time_t sec = inf->stat.st_mtime; + verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); +- sprintf (buf, "%ld.%.9d", sec, nsec); ++ sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); + } + fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); + } |
