summaryrefslogtreecommitdiff
path: root/lib/libc/time
diff options
context:
space:
mode:
authorThorsten Lockert <tholo@cvs.openbsd.org>1996-10-30 00:20:15 +0000
committerThorsten Lockert <tholo@cvs.openbsd.org>1996-10-30 00:20:15 +0000
commitf40056afbe45456bd713765a65865aa1eb56658f (patch)
treea5265ca1ed1f70836554fccc4df3c39795cb1388 /lib/libc/time
parent25a657f366c8e12f32bd5207d1b91b7ff0afcb27 (diff)
iUpdate to pass FIPS 151-2 tests
Diffstat (limited to 'lib/libc/time')
-rw-r--r--lib/libc/time/localtime.c9
-rw-r--r--lib/libc/time/private.h5
2 files changed, 11 insertions, 3 deletions
diff --git a/lib/libc/time/localtime.c b/lib/libc/time/localtime.c
index cf496087a11..c25b4356049 100644
--- a/lib/libc/time/localtime.c
+++ b/lib/libc/time/localtime.c
@@ -1,5 +1,5 @@
#if defined(LIBC_SCCS) && !defined(lint)
-static char rcsid[] = "$OpenBSD: localtime.c,v 1.6 1996/09/05 12:28:23 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: localtime.c,v 1.7 1996/10/30 00:20:14 tholo Exp $";
#endif /* LIBC_SCCS and not lint */
/*
@@ -1366,7 +1366,14 @@ int * const okayp;
dir = tmcomp(&mytm, &yourtm);
if (dir != 0) {
if (bits-- < 0)
+#ifdef PCTS
+ {
+ t += 2;
+ break;
+ }
+#else
return WRONG;
+#endif
if (bits < 0)
--t; /* may be needed if new t is minimal */
else if (dir > 0)
diff --git a/lib/libc/time/private.h b/lib/libc/time/private.h
index 6dd4b8df904..a90fc20638b 100644
--- a/lib/libc/time/private.h
+++ b/lib/libc/time/private.h
@@ -1,11 +1,12 @@
-/* $OpenBSD: private.h,v 1.4 1996/08/19 08:34:51 tholo Exp $ */
+/* $OpenBSD: private.h,v 1.5 1996/10/30 00:20:12 tholo Exp $ */
#ifndef PRIVATE_H
#define PRIVATE_H
-/* NetBSD defaults */
+/* OpenBSD defaults */
#define TM_GMTOFF tm_gmtoff
#define TM_ZONE tm_zone
+#define PCTS 1
#define STD_INSPIRED 1
#define HAVE_LONG_DOUBLE 1