From 8af7b72d8d889875e2912fddd087a79a9dc3c67a Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 25 Apr 2022 17:25:55 -0400 Subject: [PATCH] OS.h: Remove set_timezone function from header, place behind _BEOS_R5_COMPATIBLE_. Long ago deprecated, not used in the tree. --- headers/os/kernel/OS.h | 3 --- src/system/libroot/os/time.cpp | 22 ++++++++++------------ 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/headers/os/kernel/OS.h b/headers/os/kernel/OS.h index cfae3581b4..62ff358648 100644 --- a/headers/os/kernel/OS.h +++ b/headers/os/kernel/OS.h @@ -386,9 +386,6 @@ extern bigtime_t system_time(void); extern nanotime_t system_time_nsecs(void); /* time since booting in nanoseconds */ - /* deprecated (is no-op) */ -extern status_t set_timezone(const char *timezone); - /* Alarm */ enum { diff --git a/src/system/libroot/os/time.cpp b/src/system/libroot/os/time.cpp index 5bf32fae7b..789c979be3 100644 --- a/src/system/libroot/os/time.cpp +++ b/src/system/libroot/os/time.cpp @@ -66,18 +66,6 @@ set_real_time_clock(unsigned long secs) } -status_t -set_timezone(const char* /*timezone*/) -{ - /* There's nothing we can do here, since we no longer support named - * timezones. - * - * TODO: should we keep this around for compatibility or get rid of it? - */ - return ENOSYS; -} - - bigtime_t set_alarm(bigtime_t when, uint32 mode) { @@ -112,3 +100,13 @@ set_alarm(bigtime_t when, uint32 mode) return oldInfo.remaining_time != B_INFINITE_TIMEOUT ? oldInfo.remaining_time : 0; } + + +#ifdef _BEOS_R5_COMPATIBLE_ +extern "C" status_t +set_timezone(const char* /*timezone*/) +{ + // There's nothing we can do here, since we no longer support named timezones. + return ENOSYS; +} +#endif