summary refs log tree commit diff
path: root/timezone
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2012-11-13 22:25:45 +0000
committerJoseph Myers <joseph@codesourcery.com>2012-11-13 22:25:45 +0000
commite27d476a652874ad8556fcdb06d877ebabb3e9c7 (patch)
tree076cd90c6e6d6dcf584493c8e332e3abe309665e /timezone
parent8ca8931812236803335e0aa13d4c3158bf6c67de (diff)
downloadglibc-e27d476a652874ad8556fcdb06d877ebabb3e9c7.tar.gz
glibc-e27d476a652874ad8556fcdb06d877ebabb3e9c7.tar.xz
glibc-e27d476a652874ad8556fcdb06d877ebabb3e9c7.zip
Update tzcode from upstream git and support --with-bugurl for it.
Diffstat (limited to 'timezone')
-rw-r--r--timezone/Makefile6
-rw-r--r--timezone/tzselect.ksh10
-rw-r--r--timezone/zdump.c6
-rw-r--r--timezone/zic.c10
4 files changed, 18 insertions, 14 deletions
diff --git a/timezone/Makefile b/timezone/Makefile
index 87b03e2c5f..a1da8fa56c 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -57,7 +57,7 @@ $(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
 $(objpfx)zic.o $(objpfx)zdump.o: $(objpfx)version.h
 
 $(objpfx)version.h: $(common-objpfx)config.make
-	echo 'static char const TZVERSION[]="$(PKGVERSION)$(version)";' \
+	echo 'static char const TZVERSION[]="$(version)";' \
 	    > $@.new
 	mv -f $@.new $@
 
@@ -115,7 +115,9 @@ $(testdata)/Asia/Tokyo: asia $(zic-deps)
 $(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
 	sed -e 's|/bin/bash|$(KSH)|g' \
 	    -e '/TZDIR=/s|\$$(pwd)|$(zonedir)|' \
-	    -e '/TZVERSION=/s|see_Makefile|"$(PKGVERSION)$(version)"|' \
+	    -e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
+	    -e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
+	    -e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
 	    < $< > $@.new
 	chmod 555 $@.new
 	mv -f $@.new $@
diff --git a/timezone/tzselect.ksh b/timezone/tzselect.ksh
index 4fe5d02ba1..8e66b44273 100644
--- a/timezone/tzselect.ksh
+++ b/timezone/tzselect.ksh
@@ -1,6 +1,8 @@
 #!/bin/bash
 
+PKGVERSION='(tzcode) '
 TZVERSION=see_Makefile
+REPORT_BUGS_TO=tz@iana.org
 
 # Ask the user about the time zone, and output the resulting TZ value to stdout.
 # Interact with the user via stderr and stdin.
@@ -43,14 +45,14 @@ if [ "$1" = "--help" ]; then
 Usage: tzselect
 Select a time zone interactively.
 
-Report bugs to tz@elsie.nci.nih.gov.
+Report bugs to $REPORT_BUGS_TO.
 EOF
-    exit 0
+    exit
 elif [ "$1" = "--version" ]; then
     cat <<EOF
-tzselect $TZVERSION
+tzselect $PKGVERSION$TZVERSION
 EOF
-    exit 0
+    exit
 fi
 
 # Make sure the tables are readable.
diff --git a/timezone/zdump.c b/timezone/zdump.c
index 805267d14c..9255affc16 100644
--- a/timezone/zdump.c
+++ b/timezone/zdump.c
@@ -272,8 +272,8 @@ usage(FILE * const stream, const int status)
 	(void) fprintf(stream,
 _("%s: usage is %s [ --version ] [ --help ] [ -v ] [ -c [loyear,]hiyear ] zonename ...\n\
 \n\
-Report bugs to tz@elsie.nci.nih.gov.\n"),
-		       progname, progname);
+Report bugs to %s.\n"),
+		       progname, progname, REPORT_BUGS_TO);
 	exit(status);
 }
 
@@ -309,7 +309,7 @@ main(int argc, char *argv[])
 	progname = argv[0];
 	for (i = 1; i < argc; ++i)
 		if (strcmp(argv[i], "--version") == 0) {
-			(void) printf("%s\n", TZVERSION);
+			(void) printf("zdump %s%s\n", PKGVERSION, TZVERSION);
 			exit(EXIT_SUCCESS);
 		} else if (strcmp(argv[i], "--help") == 0) {
 			usage(stdout, EXIT_SUCCESS);
diff --git a/timezone/zic.c b/timezone/zic.c
index 64af1b21b3..a5202a1ac3 100644
--- a/timezone/zic.c
+++ b/timezone/zic.c
@@ -426,8 +426,8 @@ usage(FILE *stream, int status)
 [ --version ] [ --help ] [ -v ] [ -l localtime ] [ -p posixrules ] \\\n\
 \t[ -d directory ] [ -L leapseconds ] [ -y yearistype ] [ filename ... ]\n\
 \n\
-Report bugs to tz@elsie.nci.nih.gov.\n"),
-		       progname, progname);
+Report bugs to %s.\n"),
+		       progname, progname, REPORT_BUGS_TO);
 	exit(status);
 }
 
@@ -462,7 +462,7 @@ main(int argc, char **argv)
 	}
 	for (i = 1; i < argc; ++i)
 		if (strcmp(argv[i], "--version") == 0) {
-			(void) printf("%s\n", TZVERSION);
+			(void) printf("zic %s%s\n", PKGVERSION, TZVERSION);
 			exit(EXIT_SUCCESS);
 		} else if (strcmp(argv[i], "--help") == 0) {
 			usage(stdout, EXIT_SUCCESS);
@@ -2534,8 +2534,8 @@ newabbr(const char *const string)
 				++cp;
 		if (cp - string == 0)
 mp = _("time zone abbreviation lacks alphabetic at start");
-		if (noise && cp - string > 3)
-mp = _("time zone abbreviation has more than 3 alphabetics");
+		if (noise && cp - string < 3)
+mp = _("time zone abbreviation has fewer than 3 alphabetics");
 		if (cp - string > ZIC_MAX_ABBR_LEN_WO_WARN)
 mp = _("time zone abbreviation has too many alphabetics");
 		if (mp == NULL && (*cp == '+' || *cp == '-')) {