From 51969495ee36e7166519d2e9df4c14a25e4581e2 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 29 Apr 2019 10:23:44 -0700 Subject: [PATCH] Define TIME_UTC to be 1. TIME_UTC is the only time base defined by the relevant standards. This change doesn't preclude adding other time bases in the future. --- expected/wasm32-wasi/predefined-macros.txt | 2 +- libc-bottom-half/headers/public/__header_time.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/expected/wasm32-wasi/predefined-macros.txt b/expected/wasm32-wasi/predefined-macros.txt index dfdeedb..63da817 100644 --- a/expected/wasm32-wasi/predefined-macros.txt +++ b/expected/wasm32-wasi/predefined-macros.txt @@ -2302,7 +2302,7 @@ #define TIME_INS 1 #define TIME_OK 0 #define TIME_OOP 3 -#define TIME_UTC __WASI_CLOCK_REALTIME +#define TIME_UTC 1 #define TIME_WAIT 4 #define TMAGIC "ustar" #define TMAGLEN 6 diff --git a/libc-bottom-half/headers/public/__header_time.h b/libc-bottom-half/headers/public/__header_time.h index efe42e7..c625159 100644 --- a/libc-bottom-half/headers/public/__header_time.h +++ b/libc-bottom-half/headers/public/__header_time.h @@ -23,7 +23,10 @@ extern const struct __clockid _CLOCK_REALTIME; extern const struct __clockid _CLOCK_THREAD_CPUTIME_ID; #define CLOCK_THREAD_CPUTIME_ID (&_CLOCK_THREAD_CPUTIME_ID) -#define TIME_UTC __WASI_CLOCK_REALTIME +/* + * TIME_UTC is the only standardized time base value. + */ +#define TIME_UTC 1 /* * Note that XSI specifies CLOCKS_PER_SEC to be 1000000, rather than -- 2.39.5