Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/time welcome to tzcode2012h via patch.
details: https://anonhg.NetBSD.org/src/rev/b407f7e4d35f
branches: trunk
changeset: 782329:b407f7e4d35f
user: christos <christos%NetBSD.org@localhost>
date: Sun Oct 28 17:11:33 2012 +0000
description:
welcome to tzcode2012h via patch.
diffstat:
lib/libc/time/Makefile | 4 ++--
lib/libc/time/Theory | 2 +-
lib/libc/time/asctime.c | 12 ++++++------
lib/libc/time/localtime.c | 10 +++++-----
4 files changed, 14 insertions(+), 14 deletions(-)
diffs (116 lines):
diff -r 71406fcab050 -r b407f7e4d35f lib/libc/time/Makefile
--- a/lib/libc/time/Makefile Sun Oct 28 17:07:44 2012 +0000
+++ b/lib/libc/time/Makefile Sun Oct 28 17:11:33 2012 +0000
@@ -3,7 +3,7 @@
# 2009-05-17 by Arthur David Olson.
# Version numbers of the code and data distributions.
-VERSION = 2012g
+VERSION = 2012h
# Change the line below for your time zone (after finding the zone you want in
# the time zone files, or adding it to a time zone file).
@@ -457,7 +457,7 @@
make clean
for i in "long long" unsigned double; \
do \
- make CFLAGS="-DTYPECHECK -D_TIME_T \"-Dtime_t=$$i\"" ; \
+ make CFLAGS="-DTYPECHECK -D__time_t_defined -D_TIME_T \"-Dtime_t=$$i\"" ; \
./zdump -v Europe/Rome ; \
make clean ; \
done
diff -r 71406fcab050 -r b407f7e4d35f lib/libc/time/Theory
--- a/lib/libc/time/Theory Sun Oct 28 17:07:44 2012 +0000
+++ b/lib/libc/time/Theory Sun Oct 28 17:11:33 2012 +0000
@@ -226,7 +226,7 @@
agreed since 1970. This is essential for the intended use: static
clocks keeping local civil time.
- * Indicate to humans as to where that region is. This simplifes use.
+ * Indicate to humans as to where that region is. This simplifies use.
* Be robust in the presence of political changes. This reduces the
number of updates and backward-compatibility hacks. For example,
diff -r 71406fcab050 -r b407f7e4d35f lib/libc/time/asctime.c
--- a/lib/libc/time/asctime.c Sun Oct 28 17:07:44 2012 +0000
+++ b/lib/libc/time/asctime.c Sun Oct 28 17:11:33 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: asctime.c,v 1.17 2012/10/26 18:29:49 christos Exp $ */
+/* $NetBSD: asctime.c,v 1.18 2012/10/28 17:11:33 christos Exp $ */
/*
** This file is in the public domain, so clarified as of
@@ -16,7 +16,7 @@
#if 0
static char elsieid[] = "@(#)asctime.c 8.5";
#else
-__RCSID("$NetBSD: asctime.c,v 1.17 2012/10/26 18:29:49 christos Exp $");
+__RCSID("$NetBSD: asctime.c,v 1.18 2012/10/28 17:11:33 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -87,15 +87,15 @@
char *
asctime_r(const struct tm *timeptr, char *buf)
{
- static const char *wday_name[7] = {
+ static const char wday_name[][3] = {
"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
};
- static const char *mon_name[12] = {
+ static const char mon_name[][3] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
};
- register const char * wn;
- register const char * mn;
+ const char * wn;
+ const char * mn;
char year[INT_STRLEN_MAXIMUM(int) + 2];
char result[MAX_ASCTIME_BUF_SIZE];
diff -r 71406fcab050 -r b407f7e4d35f lib/libc/time/localtime.c
--- a/lib/libc/time/localtime.c Sun Oct 28 17:07:44 2012 +0000
+++ b/lib/libc/time/localtime.c Sun Oct 28 17:11:33 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: localtime.c,v 1.70 2012/10/26 23:23:23 christos Exp $ */
+/* $NetBSD: localtime.c,v 1.71 2012/10/28 17:11:33 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.70 2012/10/26 23:23:23 christos Exp $");
+__RCSID("$NetBSD: localtime.c,v 1.71 2012/10/28 17:11:33 christos Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -83,7 +83,7 @@
static const char wildabbr[] = WILDABBR;
-static char gmt[] = "GMT";
+static const char gmt[] = "GMT";
/*
** The DST rules to use if TZ has no rules and we can't load TZDEFRULES.
@@ -268,7 +268,7 @@
time_t result;
int i;
- result = (codep[0] & 0x80) ? -1 : 0;
+ result = (codep[0] & 0x80) ? (~(int_fast64_t) 0) : 0;
for (i = 0; i < 8; ++i)
result = result * 256 + (codep[i] & 0xff);
return result;
@@ -346,7 +346,7 @@
timezone = -(ttisp->tt_gmtoff);
#endif /* defined USG_COMPAT */
#ifdef ALTZONE
- if (i == 0 || ttisp->tt_isdst)
+ if (ttisp->tt_isdst)
altzone = -(ttisp->tt_gmtoff);
#endif /* defined ALTZONE */
}
Home |
Main Index |
Thread Index |
Old Index