[tz] [PATCH 2/2] build: remove NOSOLAR option

Paul Eggert eggert at cs.ucla.edu
Mon Nov 4 19:29:00 UTC 2013


The current tzdata now goes to 17, which is uncomfortably close to
the NOSOLAR limit of 20.
* Makefile (CFLAGS): Remove NOSOLAR comment.
* tzfile.h (TZ_MAX_TYPES): Ignore NOSOLAR; always default to 256.
* NEWS: Document this.
---
 Makefile |  8 --------
 NEWS     |  6 ++++++
 tzfile.h | 10 +---------
 3 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/Makefile b/Makefile
index 529b5fc..dd81b20 100644
--- a/Makefile
+++ b/Makefile
@@ -196,14 +196,6 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
 # These functions may well disappear in future releases of the time
 # conversion package.
 #
-# If you'll never want to handle solar-time-based time zones, add
-#    -DNOSOLAR
-# to the end of the "CFLAGS=" line
-# (and comment out the "SDATA=" line below).
-# This reduces (slightly) the run-time data-space requirements of
-# the time conversion functions; it may reduce the acceptability of your system
-# to folks in oil- and cash-rich places.
-#
 # If you want to allocate state structures in localtime, add
 #    -DALL_STATE
 # to the end of the "CFLAGS=" line.  Storage is obtained by calling malloc.
diff --git a/NEWS b/NEWS
index 5d4d6ef..246abcd 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ News for the tz database
 
 Unreleased, experimental changes
 
+  Changes affecting code
+
+    The compile-time flag NOSOLAR has been removed, as nowadays the
+    benefit of slightly shrinking runtime table size is outweighed by the
+    cost of disallowing potential future updates that exceed old limits.
+
   Changes affecting documentation and commentary
 
     The files solar87, solar88, and solar89 are no longer distributed.
diff --git a/tzfile.h b/tzfile.h
index a2955dd..529650d 100644
--- a/tzfile.h
+++ b/tzfile.h
@@ -101,16 +101,8 @@ struct tzhead {
 #endif /* !defined TZ_MAX_TIMES */
 
 #ifndef TZ_MAX_TYPES
-#ifndef NOSOLAR
+/* This must be at least 17 for Europe/Samara and Europe/Vilnius.  */
 #define TZ_MAX_TYPES    256 /* Limited by what (unsigned char)'s can hold */
-#endif /* !defined NOSOLAR */
-#ifdef NOSOLAR
-/*
-** Must be at least 14 for Europe/Riga as of Jan 12 1995,
-** as noted by Earl Chew.
-*/
-#define TZ_MAX_TYPES    20    /* Maximum number of local time types */
-#endif /* !defined NOSOLAR */
 #endif /* !defined TZ_MAX_TYPES */
 
 #ifndef TZ_MAX_CHARS
-- 
1.8.3.1




More information about the tz mailing list