Module Name: src
Committed By: christos
Date: Thu Dec 31 16:04:32 UTC 2009
Modified Files:
src/sys/arch/i386/i386: apmbios.c
Log Message:
Fix compilation issue with time_t
To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/i386/i386/apmbios.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/i386/i386/apmbios.c
diff -u src/sys/arch/i386/i386/apmbios.c:1.15 src/sys/arch/i386/i386/apmbios.c:1.16
--- src/sys/arch/i386/i386/apmbios.c:1.15 Fri Nov 20 22:11:00 2009
+++ src/sys/arch/i386/i386/apmbios.c Thu Dec 31 11:04:32 2009
@@ -1,4 +1,4 @@
-/* $NetBSD: apmbios.c,v 1.15 2009/11/21 03:11:00 rmind Exp $ */
+/* $NetBSD: apmbios.c,v 1.16 2009/12/31 16:04:32 christos Exp $ */
/*-
* Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apmbios.c,v 1.15 2009/11/21 03:11:00 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apmbios.c,v 1.16 2009/12/31 16:04:32 christos Exp $");
#include "opt_apm.h"
#include "opt_compat_mach.h" /* Needed to get the right segment def */
@@ -221,6 +221,7 @@
const char *name;
int inf;
int outf = 0; /* XXX: gcc */
+ long long milli;
if (print) {
if (func >= sizeof(aci) / sizeof(aci[0])) {
@@ -232,12 +233,13 @@
outf = aci[func].outflag;
}
inittodr(time_second); /* update timestamp */
+ milli = time_second % 1000;
if (name)
- printf("apmc...@%03ld: %s/%#x (line=%d) ",
- time_second % 1000, name, func, line);
+ printf("apmc...@%03lld: %s/%#x (line=%d) ",
+ milli, name, func, line);
else
- printf("apmc...@%03ld: %#x (line=%d) ",
- time_second % 1000, func, line);
+ printf("apmc...@%03lld: %#x (line=%d) ",
+ milli, func, line);
acallpr(inf, "in:", regs);
}
rv = apmcall(func, regs);