[tz] [PROPOSED 3/4] Treat TZDEFAULT more like TZDIR
Paul Eggert
eggert at cs.ucla.edu
Sat Nov 25 23:36:38 UTC 2023
* Makefile (tzdir.h): Also #define TZDEFAULT.
* NEWS: Mention this.
* tzfile.h (TZDIR): Remove; now defined by tzdir.h.
---
Makefile | 3 +++
NEWS | 3 ++-
tzfile.h | 4 ----
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index 6e8e8fd9..e68bdb0c 100644
--- a/Makefile
+++ b/Makefile
@@ -688,6 +688,9 @@ tzdata.zi: $(DATAFORM).zi version zishrink.awk
tzdir.h:
printf '%s\n' >$@.out \
+ '#ifndef TZDEFAULT' \
+ '# define TZDEFAULT "$(TZDEFAULT)" /* default zone */' \
+ '#endif' \
'#ifndef TZDIR' \
'# define TZDIR "$(TZDIR)" /* TZif directory */' \
'#endif'
diff --git a/NEWS b/NEWS
index 0f033eca..5b228f47 100644
--- a/NEWS
+++ b/NEWS
@@ -47,7 +47,8 @@ Unreleased, experimental changes
* It now uses ARFLAGS, with default specified by POSIX.
* It does not use LFLAGS incompatibly with POSIX.
Due to the CC changes, TZDIR is now #defined in a file tzfile.h
- built by 'make', not in a $(CC) -D option.
+ built by 'make', not in a $(CC) -D option. Also, TZDEFAULT is
+ now treated like TZDIR as they have similar roles.
Changes to commentary
diff --git a/tzfile.h b/tzfile.h
index fcb7ab1d..21ae37c1 100644
--- a/tzfile.h
+++ b/tzfile.h
@@ -21,10 +21,6 @@
** Information about time zone files.
*/
-#ifndef TZDEFAULT
-# define TZDEFAULT "/etc/localtime"
-#endif /* !defined TZDEFAULT */
-
#ifndef TZDEFRULES
# define TZDEFRULES "posixrules"
#endif /* !defined TZDEFRULES */
--
2.40.1
More information about the tz
mailing list