diff options
author | obrien <obrien@FreeBSD.org> | 2012-08-17 18:20:38 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2012-08-17 18:20:38 +0000 |
commit | a941b72fdcab943e0f1e1808f5006a4bcaefca52 (patch) | |
tree | 616bba1a4cc7a708e0aaea3712968c5fe7b4fd6f /contrib/diff/src/context.c | |
parent | b45a39ac78c3f73e5a6b942853a315637798663d (diff) | |
download | FreeBSD-src-a941b72fdcab943e0f1e1808f5006a4bcaefca52.zip FreeBSD-src-a941b72fdcab943e0f1e1808f5006a4bcaefca52.tar.gz |
Catch up with the subversion conversion and apply these build-time patches.
Diffstat (limited to 'contrib/diff/src/context.c')
-rw-r--r-- | contrib/diff/src/context.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/diff/src/context.c b/contrib/diff/src/context.c index 2055ff1..4937ce2 100644 --- a/contrib/diff/src/context.c +++ b/contrib/diff/src/context.c @@ -29,7 +29,7 @@ # define TIMESPEC_NS(timespec) 0 #endif -size_t nstrftime (char *, size_t, char const *, struct tm const *, int, int); +size_t nstrftime (char *, size_t, char const *, struct tm const *, int, long); static char const *find_function (char const * const *, lin); static struct change *find_hunk (struct change *); @@ -57,12 +57,12 @@ print_context_label (char const *mark, char buf[MAX (INT_STRLEN_BOUND (int) + 32, 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_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - 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); } |