Skip to content

Commit

Permalink
zic now defaults to ‘-b slim’
Browse files Browse the repository at this point in the history
Make zic’s ‘-b slim’ option the default.  This option first
appeared in tzdb 2019b (2019-07-01), and is already the default in
NetBSD 9.0 (2020-02-14) and seems to be working there.  Using
slim format should help finish off the TZif format’s Y2038
transition that began in tzcode 95f (1995-10-28).
* Makefile, NEWS, zic.8: Mention this.
* zic.c (ZIC_BLOAT_DEFAULT): Default to "slim".
  • Loading branch information
eggert committed Jun 21, 2020
1 parent 08c326d commit 6ba6f21
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ BUGEMAIL= [email protected]
# DATAFORM= main
# To wait even longer for new features, use:
# DATAFORM= rearguard
# Rearguard users might also want "ZFLAGS = -b fat"; see below.
DATAFORM= main

# Change the line below for your timezone (after finding the one you want in
Expand Down Expand Up @@ -249,13 +250,12 @@ LDLIBS=
# other than simply getting garbage data
# -DUSE_LTZ=0 to build zdump with the system time zone library
# Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
# -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and
# similarly for "fat". Fat TZif files work around incompatibilities
# -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
# similarly for "slim". Fat TZif files work around incompatibilities
# and bugs in some TZif readers, notably readers that mishandle 64-bit
# data in TZif files. Slim TZif files are more efficient and do not
# work around these incompatibilities and bugs. If not given, the
# current default is "fat" but this is intended to change as readers
# requiring fat files often mishandle timestamps after 2037 anyway.
# default is "slim".
# -DZIC_MAX_ABBR_LEN_WO_WARN=3
# (or some other number) to set the maximum time zone abbreviation length
# that zic will accept without a warning (the default is 6)
Expand Down Expand Up @@ -390,7 +390,7 @@ ZIC= $(zic) $(ZFLAGS)

# To shrink the size of installed TZif files,
# append "-r @N" to omit data before N-seconds-after-the-Epoch.
# You can also append "-b slim" if that is not already the default;
# To grow the files and work around older application bugs, append "-b fat";
# see ZIC_BLOAT_DEFAULT above.
# See the zic man page for more about -b and -r.
ZFLAGS=
Expand Down
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Unreleased, experimental changes

Changes to code

zic now defaults to '-b slim' instead of to '-b fat'.

zic's new '-l -' and '-p -' options uninstall any existing
localtime and posixrules files, respectively.

Expand Down
10 changes: 4 additions & 6 deletions zic.8
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,13 @@ is
.BR slim ,
keep the output files small; this can help check for the bugs
and incompatibilities.
Although the default is currently
.BR fat ,
this is intended to change in future
.B zic
versions, as software that mishandles the 64-bit data typically
The default is
.BR slim ,
as software that mishandles 64-bit data typically
mishandles timestamps after the year 2038 anyway.
Also see the
.B \*-r
option for another way to shrink output size.
option for another way to alter output size.
.TP
.BI "\*-d " directory
Create time conversion information files in the named directory rather than
Expand Down
5 changes: 2 additions & 3 deletions zic.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,8 +661,7 @@ static const char * tzdefault;
static const char * yitcommand;

/* -1 if the TZif output file should be slim, 0 if default, 1 if the
output should be fat for backward compatibility. Currently the
default is fat, although this may change. */
output should be fat for backward compatibility. The default is slim. */
static int bloat;

static bool
Expand All @@ -672,7 +671,7 @@ want_bloat(void)
}

#ifndef ZIC_BLOAT_DEFAULT
# define ZIC_BLOAT_DEFAULT "fat"
# define ZIC_BLOAT_DEFAULT "slim"
#endif

int
Expand Down

0 comments on commit 6ba6f21

Please sign in to comment.