mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-28 13:30:29 +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/xxhash/BUILD.mk
vendored
2
third_party/xxhash/BUILD.mk
vendored
|
@ -21,7 +21,7 @@ THIRD_PARTY_XXHASH_A_DIRECTDEPS = \
|
|||
LIBC_STDIO \
|
||||
LIBC_STR \
|
||||
LIBC_SYSV \
|
||||
LIBC_TIME
|
||||
THIRD_PARTY_TZ
|
||||
|
||||
THIRD_PARTY_XXHASH_A_DEPS := \
|
||||
$(call uniq,$(foreach x,$(THIRD_PARTY_XXHASH_A_DIRECTDEPS),$($(x))))
|
||||
|
|
3
third_party/xxhash/cli/xsum_bench.c
vendored
3
third_party/xxhash/cli/xsum_bench.c
vendored
|
@ -61,8 +61,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" /* clock_t, clock, CLOCKS_PER_SEC */
|
||||
#include "libc/time.h" /* clock_t, clock, CLOCKS_PER_SEC */
|
||||
#include "libc/errno.h" /* errno */
|
||||
|
||||
#define TIMELOOP_S 1
|
||||
|
|
4
third_party/xxhash/cli/xsum_config.h
vendored
4
third_party/xxhash/cli/xsum_config.h
vendored
|
@ -87,7 +87,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" /* declares _POSIX_VERSION */
|
||||
# if defined(_POSIX_VERSION) /* POSIX compliant */
|
||||
|
@ -138,7 +138,7 @@
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/unicode.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
# if WCHAR_MAX == 0xFFFFU /* UTF-16 wchar_t */
|
||||
# define XSUM_WIN32_USE_WCHAR 1
|
||||
# else
|
||||
|
|
6
third_party/xxhash/cli/xsum_os_specific.c
vendored
6
third_party/xxhash/cli/xsum_os_specific.c
vendored
|
@ -31,7 +31,7 @@
|
|||
#include "libc/calls/weirdtypes.h"
|
||||
#include "libc/sysv/consts/s.h"
|
||||
#include "libc/sysv/consts/utime.h"
|
||||
#include "libc/time/time.h" /* stat() / _stat64() */
|
||||
#include "libc/time.h" /* stat() / _stat64() */
|
||||
|
||||
/*
|
||||
* This file contains all of the ugly boilerplate to make xxhsum work across
|
||||
|
@ -60,7 +60,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" /* isatty */
|
||||
# define XSUM_IS_CONSOLE(stdStream) isatty(fileno(stdStream))
|
||||
|
@ -207,7 +207,7 @@ int main(int argc, const char* argv[])
|
|||
#include "libc/stdio/stdio.h"
|
||||
#include "libc/str/str.h"
|
||||
#include "libc/str/unicode.h"
|
||||
#include "libc/time/time.h"
|
||||
#include "libc/time.h"
|
||||
|
||||
/*****************************************************************************
|
||||
* Unicode conversion tools
|
||||
|
|
6
third_party/xxhash/tests/bench/timefn.h
vendored
6
third_party/xxhash/tests/bench/timefn.h
vendored
|
@ -30,8 +30,7 @@ extern "C" {
|
|||
#if defined(_MSC_VER)
|
||||
// MISSING #include <sys/utime.h> /* utime */
|
||||
#else
|
||||
#include "libc/time/struct/utimbuf.h"
|
||||
#include "libc/time/time.h" /* utime */
|
||||
#include "libc/time.h" /* utime */
|
||||
#endif
|
||||
#include "libc/calls/calls.h"
|
||||
#include "libc/calls/struct/timespec.h"
|
||||
|
@ -40,8 +39,7 @@ extern "C" {
|
|||
#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" /* clock_t, clock, CLOCKS_PER_SEC */
|
||||
#include "libc/time.h" /* clock_t, clock, CLOCKS_PER_SEC */
|
||||
|
||||
|
||||
|
||||
|
|
3
third_party/xxhash/tests/collisions/main.c
vendored
3
third_party/xxhash/tests/collisions/main.c
vendored
|
@ -506,8 +506,7 @@ static inline int Filter_check(const Filter* bf, int bflog, uint64_t hash)
|
|||
#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" /* clock_t, clock, time_t, time, difftime */
|
||||
#include "libc/time.h" /* clock_t, clock, time_t, time, difftime */
|
||||
|
||||
void update_indicator(uint64_t v, uint64_t total)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue