1$FreeBSD: stable/9/gnu/usr.bin/diff/context.c.diff 205793 2010-03-28 13:16:08Z ed $ 2--- context.c.orig 2004-04-12 15:44:35.000000000 +0800 3+++ context.c 2007-06-16 22:25:11.705063242 +0800 4@@ -29,7 +29,7 @@ 5 # define TIMESPEC_NS(timespec) 0 6 #endif 7 8-size_t nstrftime (char *, size_t, char const *, struct tm const *, int, int); 9+size_t nstrftime (char *, size_t, char const *, struct tm const *, int, long); 10 11 static char const *find_function (char const * const *, lin); 12 static struct change *find_hunk (struct change *); 13@@ -57,12 +57,12 @@ 14 char buf[MAX (INT_STRLEN_BOUND (int) + 32, 15 INT_STRLEN_BOUND (time_t) + 11)]; 16 struct tm const *tm = localtime (&inf->stat.st_mtime); 17- int nsec = TIMESPEC_NS (inf->stat.st_mtim); 18+ long nsec = TIMESPEC_NS (inf->stat.st_mtim); 19 if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) 20 { 21- long int sec = inf->stat.st_mtime; 22+ time_t sec = inf->stat.st_mtime; 23 verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); 24- sprintf (buf, "%ld.%.9d", sec, nsec); 25+ sprintf (buf, "%jd.%.9d", (intmax_t)sec, nsec); 26 } 27 fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); 28 } 29