From 13b9be18f43cceb7ec7d8a583ae6ccf7243c6c9a Mon Sep 17 00:00:00 2001 From: christos Date: Mon, 29 Dec 2008 04:09:25 +0000 Subject: fix size and format of time_t holding variable. --- gnu/dist/diffutils/src/context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/dist/diffutils/src/context.c') diff --git a/gnu/dist/diffutils/src/context.c b/gnu/dist/diffutils/src/context.c index 0b29cd3e929..bd03010171b 100644 --- a/gnu/dist/diffutils/src/context.c +++ b/gnu/dist/diffutils/src/context.c @@ -1,4 +1,4 @@ -/* $NetBSD: context.c,v 1.1.1.1 2003/01/26 00:43:16 wiz Exp $ */ +/* $NetBSD: context.c,v 1.2 2008/12/29 04:09:25 christos Exp $ */ /* Context-format output routines for GNU DIFF. @@ -63,9 +63,9 @@ print_context_label (char const *mark, int nsec = TIMESPEC_NS (inf->stat.st_mtim); if (! (tm && nstrftime (buf, sizeof buf, time_format, tm, 0, nsec))) { - long sec = inf->stat.st_mtime; + long long sec = inf->stat.st_mtime; verify (info_preserved, sizeof inf->stat.st_mtime <= sizeof sec); - sprintf (buf, "%ld.%.9d", sec, nsec); + sprintf (buf, "%lld.%.9d", sec, nsec); } fprintf (outfile, "%s %s\t%s\n", mark, inf->name, buf); } -- cgit