diff options
| author | Bernard Xiong <[email protected]> | 2018-11-20 23:13:45 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2018-11-20 23:13:45 +0800 |
| commit | 46dae3f35f5cc44664a26ebd87803156033a166a (patch) | |
| tree | 47f132d0a7472768deabd2add67d990c0c6e64e7 /components/libc/compilers/dlib | |
| parent | b31888de49408b212d2aeab4b40b2a672b958313 (diff) | |
| parent | 6b6d122e3673ca64d2171d3daf1ae940edfa699a (diff) | |
Merge branch 'master' into dev-4.0.x
Diffstat (limited to 'components/libc/compilers/dlib')
| -rw-r--r-- | components/libc/compilers/dlib/sys/time.h | 1 | ||||
| -rw-r--r-- | components/libc/compilers/dlib/time.c | 11 |
2 files changed, 9 insertions, 3 deletions
diff --git a/components/libc/compilers/dlib/sys/time.h b/components/libc/compilers/dlib/sys/time.h index 766d219faf..baf566936b 100644 --- a/components/libc/compilers/dlib/sys/time.h +++ b/components/libc/compilers/dlib/sys/time.h @@ -52,6 +52,7 @@ struct timezone { }; int gettimeofday(struct timeval *tp, void *ignore); +struct tm *gmtime_r(const time_t *timep, struct tm *r); #ifdef __cplusplus } diff --git a/components/libc/compilers/dlib/time.c b/components/libc/compilers/dlib/time.c index 12c7f893e9..87574df851 100644 --- a/components/libc/compilers/dlib/time.c +++ b/components/libc/compilers/dlib/time.c @@ -41,10 +41,15 @@ int gettimeofday(struct timeval *tp, void *ignore) * */ #pragma module_name = "?time" -#if _DLIB_TIME_ALLOW_64 -__time64_t __time64(__time64_t *t) +#if _DLIB_TIME_USES_64 +time_t __time64(time_t *t) #else -__time32_t __time32(__time32_t *t) +/* for IAR 6.2 later Compiler */ +#if defined (__IAR_SYSTEMS_ICC__) && (__VER__) >= 6020000 +time_t __time32(time_t *t) +#else +time_t time(time_t *t) +#endif #endif { time_t time_now = 0; |
