Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc/time time_t_{min, max} are only used in localtime.c



details:   https://anonhg.NetBSD.org/src/rev/66667ad7d535
branches:  trunk
changeset: 325223:66667ad7d535
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Dec 13 10:37:24 2013 +0000

description:
time_t_{min,max} are only used in localtime.c

diffstat:

 lib/libc/time/localtime.c |  14 ++++++++++++--
 lib/libc/time/private.h   |  13 +------------
 2 files changed, 13 insertions(+), 14 deletions(-)

diffs (62 lines):

diff -r 7215726adcb5 -r 66667ad7d535 lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Fri Dec 13 10:34:47 2013 +0000
+++ b/lib/libc/time/localtime.c Fri Dec 13 10:37:24 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $  */
+/*     $NetBSD: localtime.c,v 1.80 2013/12/13 10:37:24 christos Exp $  */
 
 /*
 ** This file is in the public domain, so clarified as of
@@ -10,7 +10,7 @@
 #if 0
 static char    elsieid[] = "@(#)localtime.c    8.17";
 #else
-__RCSID("$NetBSD: localtime.c,v 1.79 2013/12/13 10:34:47 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.80 2013/12/13 10:37:24 christos Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -46,6 +46,16 @@
 #define TZ_ABBR_ERR_CHAR       '_'
 #endif /* !defined TZ_ABBR_ERR_CHAR */
 
+/* The minimum and maximum finite time values.  */
+static time_t const time_t_min =
+  (TYPE_SIGNED(time_t)
+   ? (time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1)
+   : 0);
+static time_t const time_t_max =
+  (TYPE_SIGNED(time_t)
+   ? - (~ 0 < 0) - ((time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1))
+   : -1);
+
 /*
 ** SunOS 4.1.1 headers lack O_BINARY.
 */
diff -r 7215726adcb5 -r 66667ad7d535 lib/libc/time/private.h
--- a/lib/libc/time/private.h   Fri Dec 13 10:34:47 2013 +0000
+++ b/lib/libc/time/private.h   Fri Dec 13 10:37:24 2013 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: private.h,v 1.30 2013/09/20 19:06:54 christos Exp $    */
+/*     $NetBSD: private.h,v 1.31 2013/12/13 10:37:24 christos Exp $    */
 
 #ifndef PRIVATE_H
 #define PRIVATE_H
@@ -329,17 +329,6 @@
 #define TYPE_SIGNED(type) (/*CONSTCOND*/((type) -1) < 0)
 #endif /* !defined TYPE_SIGNED */
 
-/* The minimum and maximum finite time values.  */
-static time_t const time_t_min =
-  (TYPE_SIGNED(time_t)
-   ? (time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1)
-/*###336 [lint] warning semantics of 'p << p' change in ANSI C; use explicit cast [118]%%%*/
-   : 0);
-static time_t const time_t_max =
-  (TYPE_SIGNED(time_t)
-   ? - (~ 0 < 0) - ((time_t) -1 << (int)(CHAR_BIT * sizeof (time_t) - 1))
-   : -1);
-
 #ifndef INT_STRLEN_MAXIMUM
 /*
 ** 302 / 1000 is log10(2.0) rounded up.



Home | Main Index | Thread Index | Old Index