summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2018-10-27 14:27:33 +0800
committerGitHub <[email protected]>2018-10-27 14:27:33 +0800
commit5d9a27d16dc240c7f3e4a4f4a45d28bc8a538558 (patch)
tree60f2bb1f0e8121e7a44c18608cef1987e63df55c
parent94c358b13e2f3df013db18962240f80f92e5c703 (diff)
parent6d2be00b9c009ff28223dce4949d2b4819b86531 (diff)
Merge pull request #1931 from hichard/renhaibo-branch
修复IAR dlib的时间映射,从rtt历史版本找到iar支持64bit时间的起始版本
-rw-r--r--components/libc/compilers/dlib/time.c11
1 files changed, 8 insertions, 3 deletions
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;