From 7973ede5a8cacd3a7d4593ae7e76d6fb0dff8e1d Mon Sep 17 00:00:00 2001 From: Meco Man <920369182@qq.com> Date: Sun, 28 Nov 2021 22:30:35 -0500 Subject: 增加RT_USING_POSIX_FS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/libc/compilers/common/sys/time.h | 3 +-- components/libc/compilers/common/time.c | 5 ----- 2 files changed, 1 insertion(+), 7 deletions(-) (limited to 'components/libc/compilers/common') diff --git a/components/libc/compilers/common/sys/time.h b/components/libc/compilers/common/sys/time.h index d14905ebfb..93e3bb7ba4 100644 --- a/components/libc/compilers/common/sys/time.h +++ b/components/libc/compilers/common/sys/time.h @@ -72,7 +72,6 @@ int settimeofday(const struct timeval *tv, const struct timezone *tz); struct tm *gmtime_r(const time_t *timep, struct tm *r); #endif -#ifdef RT_USING_POSIX /* POSIX clock and timer */ #define MILLISECOND_PER_SECOND 1000UL #define MICROSECOND_PER_SECOND 1000000UL @@ -103,8 +102,8 @@ int clock_getres (clockid_t clockid, struct timespec *res); int clock_gettime (clockid_t clockid, struct timespec *tp); int clock_settime (clockid_t clockid, const struct timespec *tp); int rt_timespec_to_tick(const struct timespec *time); -#endif /* RT_USING_POSIX */ +/* timezone */ void tz_set(int8_t tz); int8_t tz_get(void); int8_t tz_is_dst(void); diff --git a/components/libc/compilers/common/time.c b/components/libc/compilers/common/time.c index 5bfff15914..73b6d76352 100644 --- a/components/libc/compilers/common/time.c +++ b/components/libc/compilers/common/time.c @@ -486,8 +486,6 @@ RTM_EXPORT(settimeofday); RTM_EXPORT(difftime); RTM_EXPORT(strftime); -#ifdef RT_USING_POSIX - #ifdef RT_USING_RTC static volatile struct timeval _timevalue; static int _rt_clock_time_system_init() @@ -690,9 +688,6 @@ int rt_timespec_to_tick(const struct timespec *time) } RTM_EXPORT(rt_timespec_to_tick); -#endif /* RT_USING_POSIX */ - - /* timezone */ #ifndef RT_LIBC_DEFAULT_TIMEZONE #define RT_LIBC_DEFAULT_TIMEZONE 8 -- cgit v1.3.1