From 60a91a23d61a48162f428e6031d8e2c36ca3ea9f Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Thu, 9 Mar 2017 16:33:57 +0100 Subject: WIP reorganization to improve scalability of localtime --- include/time.h | 16 -- time/gmtime.c | 6 +- time/localtime.c | 6 +- time/time-private.h | 148 ++++++++++++++++ time/tzfile.c | 492 ++++++++++++++++++++++++++-------------------------- time/tzset.c | 240 ++++++++++++------------- 6 files changed, 519 insertions(+), 389 deletions(-) create mode 100644 time/time-private.h diff --git a/include/time.h b/include/time.h index 08454efa5e..19a750b518 100644 --- a/include/time.h +++ b/include/time.h @@ -38,19 +38,6 @@ libc_hidden_proto (__time_isleap) /* Defined in tzset.c. */ extern char *__tzstring (const char *string); -extern int __use_tzfile attribute_hidden; - -extern void __tzfile_read (const char *file, size_t extra, - char **extrap); -extern void __tzfile_compute (time_t timer, int use_localtime, - long int *leap_correct, int *leap_hit, - struct tm *tp); -extern void __tzfile_default (const char *std, const char *dst, - long int stdoff, long int dstoff); -extern void __tzset_parse_tz (const char *tz); -extern void __tz_compute (time_t timer, struct tm *tm, int use_localtime) - __THROW internal_function; - /* Subroutine of `mktime'. Return the `time_t' representation of TP and normalize TP, given that a `struct tm *' maps to a `time_t' as performed by FUNC. Keep track of next guess for time_t offset in *OFFSET. */ @@ -76,9 +63,6 @@ extern int __offtime (const time_t *__timer, extern char *__asctime_r (const struct tm *__tp, char *__buf); extern void __tzset (void); -/* Prototype for the internal function to get information based on TZ. */ -extern struct tm *__tz_convert (const time_t *timer, int use_localtime, struct tm *tp); - extern int __nanosleep (const struct timespec *__requested_time, struct timespec *__remaining); libc_hidden_proto (__nanosleep) diff --git a/time/gmtime.c b/time/gmtime.c index 1fc129b8e8..8a4a0a4f28 100644 --- a/time/gmtime.c +++ b/time/gmtime.c @@ -18,13 +18,14 @@ #include #include