aboutsummaryrefslogtreecommitdiff
path: root/timezone/checktab.awk
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-06-25 16:51:17 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-06-25 16:51:17 +0000
commit0828edbfd682a4849a311722b6aee24f812a6bc3 (patch)
treeb7124c09855149a8691e352f29a44ca2e13c35ce /timezone/checktab.awk
parenta4ccbc9b243926a9904624b387fb18583c3d4d4d (diff)
downloadglibc-0828edbfd682a4849a311722b6aee24f812a6bc3.tar
glibc-0828edbfd682a4849a311722b6aee24f812a6bc3.tar.gz
glibc-0828edbfd682a4849a311722b6aee24f812a6bc3.tar.bz2
glibc-0828edbfd682a4849a311722b6aee24f812a6bc3.zip
Update timezone code from tzcode 2014e.
This patch updates the timezone code from tzcode 2014e (the previous version used was 2013i). Tested x86_64. * timezone/checktab.awk: Update from tzcode 2014e. * timezone/private.h: Likewise. * timezone/tzfile.h: Likewise. * timezone/zdump.c: Likewise. * timezone/zic.c: Likewise.
Diffstat (limited to 'timezone/checktab.awk')
-rw-r--r--timezone/checktab.awk20
1 files changed, 17 insertions, 3 deletions
diff --git a/timezone/checktab.awk b/timezone/checktab.awk
index fec4f628e5..d78ba73156 100644
--- a/timezone/checktab.awk
+++ b/timezone/checktab.awk
@@ -115,10 +115,14 @@ BEGIN {
FS = " "
}
+$1 ~ /^#/ { next }
+
{
- tz = ""
- if ($1 == "Zone") tz = $2
- if ($1 == "Link") {
+ tz = rules = ""
+ if ($1 == "Zone") {
+ tz = $2
+ ruleUsed[$4] = 1
+ } else if ($1 == "Link") {
# Ignore Link commands if source and destination basenames
# are identical, e.g. Europe/Istanbul versus Asia/Istanbul.
src = $2
@@ -126,6 +130,10 @@ BEGIN {
while ((i = index(src, "/"))) src = substr(src, i+1)
while ((i = index(dst, "/"))) dst = substr(dst, i+1)
if (src != dst) tz = $3
+ } else if ($1 == "Rule") {
+ ruleDefined[$2] = 1
+ } else {
+ ruleUsed[$2] = 1
}
if (tz && tz ~ /\//) {
if (!tztab[tz]) {
@@ -138,6 +146,12 @@ BEGIN {
}
END {
+ for (tz in ruleDefined) {
+ if (!ruleUsed[tz]) {
+ printf "%s: Rule never used\n", tz
+ status = 1
+ }
+ }
for (tz in tz2cc) {
if (!zoneSeen[tz]) {
printf "%s:%d: no Zone table for `%s'\n", \