[tz] [PROPOSED 00/12] Assume POSIX.2-1992
Paul Eggert
eggert at cs.ucla.edu
Sat Jun 1 18:33:45 UTC 2024
For many years we have maintained code in tzselect and Makefile
intended to port to older platforms that predate POSIX.2-1992.
The only remaining such platform that is still supported by its
supplier is Solaris 10 (2005), which has a shell and related tools
that are still pre-POSIX by default, although POSIX variants are
available. However, I recently discovered that Solaris 10’s own copy
of tzselect now uses POSIX.2-1992 features and is based on the POSIX
variants. Now that even Oracle has abandoned its pre-POSIX
environment for TZDB, it’s time for us to follow suit.
This series of patches updates the Makefile and tzselect shell script
to assume POSIX.2-1992 or later. This simplifies maintenance and
speeds up the code a bit.
Paul Eggert (12):
Assume POSIX.2 and eschew ‘expr’
Prefer $(CMD) to `CMD` in Makefile
Prefer $PWD to $(pwd) in Makefile
Avoid subshells when possible
Assume POSIX.2 command substitution
* tzselect.ksh: Assume POSIX.2 $PWD.
* tzselect.ksh: Assume POSIX.2 awk.
Avoid some subshells in tzselect
Avoid an awk invocation via $'...'
Use ‘export VAR=VAL’ syntax
Avoid crash in Solaris 10 /usr/xpg4/bin/make
Port ! to Solaris make
.gitignore | 4 +-
Makefile | 343 +++++++++++++++++++++++++--------------------------
NEWS | 9 ++
checknow.awk | 2 +-
tzselect.ksh | 112 +++++++----------
workman.sh | 3 +-
6 files changed, 231 insertions(+), 242 deletions(-)
--
2.45.1
More information about the tz
mailing list