aboutsummaryrefslogtreecommitdiff
path: root/time/tzfile.c
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2017-03-07 09:37:46 +0100
committerFlorian Weimer <fweimer@redhat.com>2017-03-07 17:45:38 +0100
commit8492c4dd699e2a65a5a2e8fca3e0e530326c92b9 (patch)
tree86655668aff2779cb76e71c2abfdbe42a80d720b /time/tzfile.c
parent1c1243b6fc33c029488add276e56570a07803bfd (diff)
downloadglibc-8492c4dd699e2a65a5a2e8fca3e0e530326c92b9.zip
glibc-8492c4dd699e2a65a5a2e8fca3e0e530326c92b9.tar.gz
glibc-8492c4dd699e2a65a5a2e8fca3e0e530326c92b9.tar.bz2
timezone: Remove TZNAME_MAX limit from sysconf [BZ #15576]
glibc does not impose a limit, and POSIX does not allow a sysconf limit which changes during the lifetime of a process.
Diffstat (limited to 'time/tzfile.c')
-rw-r--r--time/tzfile.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/time/tzfile.c b/time/tzfile.c
index 4987f1a..d412469 100644
--- a/time/tzfile.c
+++ b/time/tzfile.c
@@ -48,8 +48,6 @@ struct leap
long int change; /* Seconds of correction to apply. */
};
-static void compute_tzname_max (size_t) internal_function;
-
static size_t num_transitions;
libc_freeres_ptr (static time_t *transitions);
static unsigned char *type_idxs;
@@ -494,8 +492,6 @@ __tzfile_read (const char *file, size_t extra, char **extrap)
if (__tzname[1] == NULL)
__tzname[1] = __tzname[0];
- compute_tzname_max (chars);
-
if (num_transitions == 0)
/* Use the first rule (which should also be the only one). */
rule_stdoff = rule_dstoff = types[0].offset;
@@ -626,8 +622,6 @@ __tzfile_default (const char *std, const char *dst,
/* Set the timezone. */
__timezone = -types[0].offset;
- compute_tzname_max (stdlen + dstlen);
-
/* Invalidate the tzfile attribute cache to force rereading
TZDEFRULES the next time it is used. */
tzfile_dev = 0;
@@ -836,21 +830,3 @@ __tzfile_compute (time_t timer, int use_localtime,
}
}
}
-
-static void
-internal_function
-compute_tzname_max (size_t chars)
-{
- const char *p;
-
- p = zone_names;
- do
- {
- const char *start = p;
- while (*p != '\0')
- ++p;
- if ((size_t) (p - start) > __tzname_cur_max)
- __tzname_cur_max = p - start;
- }
- while (++p < &zone_names[chars]);
-}