summaryrefslogtreecommitdiffstats
path: root/pom
diff options
context:
space:
mode:
authorcgd <cgd@NetBSD.org>1995-06-07 16:29:30 +0000
committercgd <cgd@NetBSD.org>1995-06-07 16:29:30 +0000
commite35c930e4666512fc59519f6d9bf73cba4ecfcbc (patch)
tree9d167c83fb8a5e94ee3da23ad63ddb785693f736 /pom
parent4fe9eedae30564d4008200dcad4b08f710dc3ca3 (diff)
downloadbsdgames-darwin-e35c930e4666512fc59519f6d9bf73cba4ecfcbc.tar.gz
bsdgames-darwin-e35c930e4666512fc59519f6d9bf73cba4ecfcbc.tar.zst
bsdgames-darwin-e35c930e4666512fc59519f6d9bf73cba4ecfcbc.zip
typeof(timeval.ts_sec) != time_t
Diffstat (limited to 'pom')
-rw-r--r--pom/pom.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pom/pom.c b/pom/pom.c
index 7b1ecc09..8a9f40f8 100644
--- a/pom/pom.c
+++ b/pom/pom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: pom.c,v 1.4 1995/03/23 08:35:36 cgd Exp $ */
+/* $NetBSD: pom.c,v 1.5 1995/06/07 16:30:46 cgd Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -45,7 +45,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
#else
-static char rcsid[] = "$NetBSD: pom.c,v 1.4 1995/03/23 08:35:36 cgd Exp $";
+static char rcsid[] = "$NetBSD: pom.c,v 1.5 1995/06/07 16:30:46 cgd Exp $";
#endif
#endif /* not lint */
@@ -82,6 +82,7 @@ main()
struct timeval tp;
struct timezone tzp;
struct tm *GMT, *gmtime();
+ time_t tmpt;
double days, today, tomorrow;
int cnt;
@@ -89,7 +90,8 @@ main()
(void)fprintf(stderr, "pom: %s\n", strerror(errno));
exit(1);
}
- GMT = gmtime(&tp.tv_sec);
+ tmpt = tp.tv_sec;
+ GMT = gmtime(&tmpt);
days = (GMT->tm_yday + 1) + ((GMT->tm_hour +
(GMT->tm_min / 60.0) + (GMT->tm_sec / 3600.0)) / 24.0);
for (cnt = EPOCH; cnt < GMT->tm_year; ++cnt)