mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 05:20:28 +00:00
Implement proper time zone support
Cosmopolitan now supports 104 time zones. They're embedded inside any binary that links the localtime() function. Doing so adds about 100kb to the binary size. This change also gets time zones working properly on Windows for the first time. It's not needed to have /etc/localtime exist on Windows, since we can get this information from WIN32. We're also now updated to the latest version of Paul Eggert's TZ library.
This commit is contained in:
parent
d5ebb1fa5b
commit
b0df6c1fce
627 changed files with 3052 additions and 2077 deletions
2
third_party/zip/BUILD.mk
vendored
2
third_party/zip/BUILD.mk
vendored
|
@ -90,9 +90,9 @@ THIRD_PARTY_ZIP_DIRECTDEPS = \
|
|||
LIBC_PROC \
|
||||
LIBC_STR \
|
||||
LIBC_SYSV \
|
||||
LIBC_TIME \
|
||||
LIBC_X \
|
||||
THIRD_PARTY_BZIP2 \
|
||||
THIRD_PARTY_TZ \
|
||||
THIRD_PARTY_ZLIB
|
||||
|
||||
THIRD_PARTY_ZIP_DEPS := \
|
||||
|
|
3
third_party/zip/crypt.c
vendored
3
third_party/zip/crypt.c
vendored
|
@ -80,8 +80,7 @@
|
|||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/sched.h"
|
||||
#include "libc/sysv/consts/timer.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h" /* time() function supplies first part of crypt seed */
|
||||
#include "libc/time.h" /* time() function supplies first part of crypt seed */
|
||||
/* "last resort" source for second part of crypt seed pattern */
|
||||
# ifndef ZCR_SEED2
|
||||
# define ZCR_SEED2 (unsigned)3141592654L /* use PI as default pattern */
|
||||
|
|
3
third_party/zip/fileio.c
vendored
3
third_party/zip/fileio.c
vendored
|
@ -30,8 +30,7 @@
|
|||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/sched.h"
|
||||
#include "libc/sysv/consts/timer.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
|
||||
#ifdef NO_MKTIME
|
||||
time_t mktime OF((struct tm *));
|
||||
|
|
2
third_party/zip/osdep.h
vendored
2
third_party/zip/osdep.h
vendored
|
@ -41,7 +41,7 @@
|
|||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/s.h"
|
||||
#include "libc/sysv/consts/utime.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
|
||||
/* printf format size prefix for zoff_t values */
|
||||
#ifdef LARGE_FILE_SUPPORT
|
||||
|
|
4
third_party/zip/tailor.h
vendored
4
third_party/zip/tailor.h
vendored
|
@ -258,7 +258,7 @@
|
|||
#include "libc/sysv/consts/fileno.h"
|
||||
#include "libc/sysv/consts/o.h"
|
||||
#include "libc/sysv/consts/ok.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
#include "third_party/musl/crypt.h"
|
||||
#include "third_party/musl/lockf.h" /* usually defines _POSIX_VERSION */
|
||||
#endif /* !NO_UNISTD_H */
|
||||
|
@ -382,7 +382,7 @@ IZ_IMP char *mktemp();
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/unicode.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/fmt/conv.h"
|
||||
#include "libc/str/str.h"
|
||||
|
|
6
third_party/zip/unix.c
vendored
6
third_party/zip/unix.c
vendored
|
@ -19,8 +19,7 @@
|
|||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/sched.h"
|
||||
#include "libc/sysv/consts/timer.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
|
||||
#if defined(MINIX) || defined(__mpexl)
|
||||
# ifdef S_IWRITE
|
||||
|
@ -60,8 +59,7 @@
|
|||
/* Library functions not in (most) header files */
|
||||
|
||||
#ifdef _POSIX_VERSION
|
||||
#include "libc/time/struct/utimbuf.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/utime.h"
|
||||
#else
|
||||
int utime OF((char *, time_t *));
|
||||
#endif
|
||||
|
|
3
third_party/zip/zip.c
vendored
3
third_party/zip/zip.c
vendored
|
@ -20,8 +20,7 @@
|
|||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/sched.h"
|
||||
#include "libc/sysv/consts/timer.h"
|
||||
#include "libc/time/struct/tm.h"
|
||||
#include "libc/time/time.h" /* for tzset() declaration */
|
||||
#include "libc/time.h" /* for tzset() declaration */
|
||||
#if defined(WIN32) || defined(WINDLL)
|
||||
# define WIN32_LEAN_AND_MEAN
|
||||
#include "libc/nt/accounting.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue