[simulator] 消除vs下的警告

This commit is contained in:
Meco Man
2022-01-05 16:43:44 -05:00
committed by Bernard Xiong
parent 495e209f37
commit 8565fe2448
8 changed files with 63 additions and 141 deletions

View File

@@ -42,20 +42,14 @@ struct timezone
int tz_dsttime; /* type of dst correction */
};
/*
* Structure returned by gettimeofday(2) system call,
* and used in other calls.
*/
#ifndef _TIMEVAL_DEFINED
#if !defined(_TIMEVAL_DEFINED) && !defined(_WIN32)
#define _TIMEVAL_DEFINED
#if !defined(_WIN32)
struct timeval
{
time_t tv_sec; /* seconds */
suseconds_t tv_usec; /* and microseconds */
};
#endif
#endif /* _TIMEVAL_DEFINED */
#if !(defined(__GNUC__) && !defined(__ARMCC_VERSION)/*GCC*/) && \
!(defined(__ICCARM__) && (__VER__ >= 8010001)) && \
@@ -73,6 +67,16 @@ int gettimeofday(struct timeval *tv, struct timezone *tz);
int settimeofday(const struct timeval *tv, const struct timezone *tz);
#if defined(__ARMCC_VERSION) || defined (__ICCARM__)
struct tm *gmtime_r(const time_t *timep, struct tm *r);
#elif defined(_WIN32)
struct tm* gmtime_r(const time_t* timep, struct tm* r);
struct tm* gmtime(const time_t* t);
struct tm* localtime_r(const time_t* t, struct tm* r);
struct tm* localtime(const time_t* t);
time_t mktime(struct tm* const t);
char* asctime_r(const struct tm* t, char* buf);
char* ctime_r(const time_t* tim_p, char* result);
char* ctime(const time_t* tim_p);
time_t time(time_t* t);
#endif
#ifdef RT_USING_POSIX_CLOCK