Date: Sat, 31 Jul 2010 17:41:58 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r210696 - head/bin/sleep Message-ID: <201007311741.o6VHfwNT048662@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Sat Jul 31 17:41:58 2010 New Revision: 210696 URL: http://svn.freebsd.org/changeset/base/210696 Log: Deal with proper format for printing time_t. Reported by: ache MFC after: 3 weeks Modified: head/bin/sleep/sleep.c Modified: head/bin/sleep/sleep.c ============================================================================== --- head/bin/sleep/sleep.c Sat Jul 31 17:23:37 2010 (r210695) +++ head/bin/sleep/sleep.c Sat Jul 31 17:41:58 2010 (r210696) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include <err.h> #include <limits.h> #include <signal.h> +#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <time.h> @@ -131,9 +132,10 @@ main(int argc, char *argv[]) * Reporting does not bother with * fractions of a second... */ - warnx("about %ld second(s) left" - " out of the original %ld", - time_to_sleep.tv_sec, original); + warnx("about %jd second(s) left" + " out of the original %jd", + (intmax_t)time_to_sleep.tv_sec, + (intmax_t)original); report_requested = 0; } else break;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201007311741.o6VHfwNT048662>