fix time_t formats

This commit is contained in:
christos 2008-12-29 05:56:02 +00:00
parent 5dd7ea59ad
commit 466a16a118
3 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: sig.c,v 1.2 2008/04/28 20:23:06 martin Exp $ */
/* $NetBSD: sig.c,v 1.3 2008/12/29 05:56:02 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -100,8 +100,8 @@ main(int argc, char **argv)
if (gettimeofday(&now, NULL) == -1)
err(1, "gettimeofday now");
timersub(&now, &then, &diff);
printf("sig: kevent returned %d in %ld.%06ld\n", n,
diff.tv_sec, diff.tv_usec);
printf("sig: kevent returned %d in %lld.%06ld\n", n,
(long long)diff.tv_sec, (long)diff.tv_usec);
if (n == -1)
err(1, "kevent(2)");
else if (n == 0)

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnode.c,v 1.4 2008/04/28 20:23:06 martin Exp $ */
/* $NetBSD: vnode.c,v 1.5 2008/12/29 05:56:02 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -98,9 +98,9 @@ main(int argc, char **argv)
if (gettimeofday(&now, NULL) == -1)
err(1, "gettimeofday now");
timersub(&now, &then, &diff);
printf("vnode '%s': kevent returned %d in %ld.%06ld\n",
printf("vnode '%s': kevent returned %d in %lld.%06ld\n",
argv[1],
n, diff.tv_sec, diff.tv_usec);
n, (long long)diff.tv_sec, (long)diff.tv_usec);
if (n == -1)
err(1, "kevent");

View File

@ -1,4 +1,4 @@
/* $NetBSD: inet.c,v 1.8 2008/04/28 20:23:06 martin Exp $ */
/* $NetBSD: inet.c,v 1.9 2008/12/29 05:56:02 christos Exp $ */
/*-
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@ -108,8 +108,8 @@ sleep(5);
err(1, "gettimeofday now");
timersub(&now, &then, &diff);
printf("iw: kevent returned %d in %ld.%06ld\n", n,
diff.tv_sec, diff.tv_usec);
printf("iw: kevent returned %d in %lld.%06ld\n", n,
(long long)diff.tv_sec, (long)diff.tv_usec);
if (n == -1)
err(1, "kevent");
else if (n == 0)
@ -212,8 +212,8 @@ printf("ir: registered sock %d\n", sock);
err(1, "ir: gettimeofday now");
timersub(&now, &then, &diff);
printf("ir: kevent returned %d in %ld.%06ld\n", n,
diff.tv_sec, diff.tv_usec);
printf("ir: kevent returned %d in %lld.%06ld\n", n,
(long long)diff.tv_sec, (long)diff.tv_usec);
if (n == -1)
err(1, "ir: kevent");
else if (n == 0)
@ -247,8 +247,8 @@ printf("ir: registered fd %d\n", fd);
err(1, "ir: gettimeofday now");
timersub(&now, &then, &diff);
printf("ir: kevent returned %d in %ld.%06ld\n", n,
diff.tv_sec, diff.tv_usec);
printf("ir: kevent returned %d in %lld.%06ld\n", n,
(long long)diff.tv_sec, (long)diff.tv_usec);
if (n == -1)
err(1, "ir: kevent");
else if (n == 0)