From 9b7dd12d564527191b0d2a7c66bbadace15653e2 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 26 Aug 2014 12:49:39 -0700 Subject: [PROPOSED PATCH 3/4] * zdump.c (main): Mention "FOO" if tzalloc("FOO") fails. * NEWS: Document this. --- NEWS | 3 ++- zdump.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index db9e46f..3ebef9e 100644 --- a/NEWS +++ b/NEWS @@ -83,7 +83,8 @@ Unreleased, experimental changes To build zdump with the system library, use 'make CFLAGS=-DUSE_LTZ=0 TZDOBJS=zdump.o CHECK_TIME_T_ALTERNATIVES='. - zdump now uses localtime_rz if available, as it's significantly faster. + zdump now uses localtime_rz if available, as it's significantly faster, + and it can help zdump better diagnose invalid time zone names. Define HAVE_LOCALTIME_RZ to 0 to suppress this. HAVE_LOCALTIME_TZ defaults to 1 if NETBSD_INSPIRED && USE_LTZ. When localtime_rz is not available, zdump now uses localtime_r and tzset if available, diff --git a/zdump.c b/zdump.c index 6fdd579..2d82fe5 100644 --- a/zdump.c +++ b/zdump.c @@ -634,7 +634,7 @@ main(int argc, char *argv[]) timezone_t tz = tzalloc(argv[i]); char const *ab; if (!tz) { - perror("tzalloc"); + perror(argv[i]); return EXIT_FAILURE; } if (! (vflag | Vflag)) { -- 1.9.1