amd64/109584: zdump(8) doesn't work
Edwin Groothuis
edwin at freebsd.org
Wed Sep 17 07:00:06 UTC 2008
The following reply was made to PR amd64/109584; it has been noted by GNATS.
From: Edwin Groothuis <edwin at freebsd.org>
To: bug-followup at FreeBSD.org, dcrandall at simplestar.com
Cc:
Subject: Re: amd64/109584: zdump(8) doesn't work
Date: Wed, 17 Sep 2008 16:53:17 +1000
Try
Index: zdump.c
===================================================================
--- zdump.c (revision 183065)
+++ zdump.c (working copy)
@@ -151,7 +151,9 @@
time_t hibit;
struct tm tm;
struct tm newtm;
+ int cpu32;
+ cpu32 = (sizeof(NULL) == 4);
INITIALIZE(cuttime);
#if HAVE_GETTEXT - 0
(void) setlocale(LC_MESSAGES, "");
@@ -222,9 +224,16 @@
/*
** Get lowest value of t.
*/
- t = hibit;
- if (t > 0) /* time_t is unsigned */
- t = 0;
+ if (cpu32) {
+ t = hibit;
+ if (t > 0) /* time_t is unsigned */
+ t = 0;
+ } else {
+ t = -2209024800; /* 1 January 1900 00:00:00 */
+ cuttime = 4000000000;
+ cutoff = "2099";
+ }
+
show(argv[i], t, TRUE);
t += SECSPERHOUR * HOURSPERDAY;
show(argv[i], t, TRUE);
It won't resolve the issue, only mask it for now. The problem is
that the time after 2037 is still not shown .
--
Edwin Groothuis
edwin at freebsd.org
http://www.mavetju.org
More information about the freebsd-amd64
mailing list