summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2015-03-15 00:41:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2015-03-15 00:41:29 +0000
commit22eb77a8bd9284ff55e7f91c659398a9a554766a (patch)
treea28c1053918bf9acff5523fc5d5d0b958b776fbb /sbin
parentb89e57b4b2848230b0a05f0d361e996015aecf61 (diff)
tzfile.h is an internal header that should never have been installed.
What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dump/optr.c5
-rw-r--r--sbin/savecore/savecore.c6
-rw-r--r--sbin/shutdown/shutdown.c3
3 files changed, 7 insertions, 7 deletions
diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c
index 74416bd9184..400f5ff941b 100644
--- a/sbin/dump/optr.c
+++ b/sbin/dump/optr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: optr.c,v 1.35 2015/01/16 06:39:57 deraadt Exp $ */
+/* $OpenBSD: optr.c,v 1.36 2015/03/15 00:41:27 millert Exp $ */
/* $NetBSD: optr.c,v 1.11 1997/05/27 08:34:36 mrg Exp $ */
/*-
@@ -44,7 +44,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
-#include <tzfile.h>
#include <unistd.h>
#include <limits.h>
#include <utmp.h>
@@ -360,6 +359,8 @@ fstabsearch(char *key)
return (NULL);
}
+#define SECSPERDAY (24 * 60 * 60)
+
/*
* Tell the operator what to do
* w ==> just what to do; W ==> most recent dumps
diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c
index 7f83c5b1160..d186c59f2b6 100644
--- a/sbin/savecore/savecore.c
+++ b/sbin/savecore/savecore.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: savecore.c,v 1.50 2015/01/16 06:40:00 deraadt Exp $ */
+/* $OpenBSD: savecore.c,v 1.51 2015/03/15 00:41:27 millert Exp $ */
/* $NetBSD: savecore.c,v 1.26 1996/03/18 21:16:05 leo Exp $ */
/*-
@@ -46,7 +46,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <tzfile.h>
#include <unistd.h>
#include <limits.h>
#include <zlib.h>
@@ -569,7 +568,8 @@ get_crashtime(void)
return (0);
}
(void)printf("savecore: system went down at %s", ctime(&dumptime));
-#define LEEWAY (7 * SECSPERDAY)
+#define SECSPERDAY (24 * 60 * 60)
+#define LEEWAY (7 * SECSPERDAY)
if (dumptime < now - LEEWAY || dumptime > now + LEEWAY) {
(void)printf("dump time is unreasonable\n");
return (0);
diff --git a/sbin/shutdown/shutdown.c b/sbin/shutdown/shutdown.c
index 31e814ffb4a..f9eae2ca01d 100644
--- a/sbin/shutdown/shutdown.c
+++ b/sbin/shutdown/shutdown.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: shutdown.c,v 1.40 2015/01/21 19:38:53 naddy Exp $ */
+/* $OpenBSD: shutdown.c,v 1.41 2015/03/15 00:41:27 millert Exp $ */
/* $NetBSD: shutdown.c,v 1.9 1995/03/18 15:01:09 cgd Exp $ */
/*
@@ -46,7 +46,6 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#include <tzfile.h>
#include <unistd.h>
#include <limits.h>
#include <errno.h>