Needed to compile Tera Term.
From: Alex Henrie alexhenrie24@gmail.com
--- dlls/msvcrt/time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index fb91aa2b1ec..56b80e84105 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -1715,7 +1715,7 @@ char * CDECL _ctime64(const __time64_t *time) /********************************************************************* * _ctime64_s (MSVCRT.@) */ -int CDECL _ctime64_s(char *res, size_t len, const __time64_t *time) +errno_t CDECL _ctime64_s(char *res, size_t len, const __time64_t *time) { struct tm *t;
@@ -1744,7 +1744,7 @@ char * CDECL _ctime32(const __time32_t *time) /********************************************************************* * _ctime32_s (MSVCRT.@) */ -int CDECL _ctime32_s(char *res, size_t len, const __time32_t *time) +errno_t CDECL _ctime32_s(char *res, size_t len, const __time32_t *time) { struct tm *t;
From: Alex Henrie alexhenrie24@gmail.com
Needed to compile Tera Term. --- include/msvcrt/time.h | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index c0db38ff7a3..a6f80dfb56f 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -74,7 +74,9 @@ _ACRTIMP void __cdecl _tzset(void); _ACRTIMP char* __cdecl asctime(const struct tm*); _ACRTIMP clock_t __cdecl clock(void); _ACRTIMP char* __cdecl _ctime32(const __time32_t*); +_ACRTIMP errno_t __cdecl _ctime32_s(char*,size_t,const __time32_t*); _ACRTIMP char* __cdecl _ctime64(const __time64_t*); +_ACRTIMP errno_t __cdecl _ctime64_s(char*,size_t,const __time64_t*); _ACRTIMP double __cdecl _difftime32(__time32_t,__time32_t); _ACRTIMP double __cdecl _difftime64(__time64_t,__time64_t); _ACRTIMP struct tm* __cdecl _gmtime32(const __time32_t*); @@ -91,6 +93,7 @@ _ACRTIMP __time64_t __cdecl _time64(__time64_t*);
#ifndef _USE_32BIT_TIME_T static inline char* ctime(const time_t *t) { return _ctime64(t); } +static inline errno_t ctime_s(char *res, size_t len, const __time64_t *t) { return _ctime64_s(res, len, t); } static inline double difftime(time_t t1, time_t t2) { return _difftime64(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime64(t); } static inline struct tm* localtime(const time_t *t) { return _localtime64(t); } @@ -98,6 +101,7 @@ static inline time_t mktime(struct tm *tm) { return _mktime64(tm); } static inline time_t time(time_t *t) { return _time64(t); } #elif defined(_UCRT) static inline char* ctime(const time_t *t) { return _ctime32(t); } +static inline errno_t ctime_s(char *res, size_t len, const __time32_t *t) { return _ctime32_s(res, len, t); } static inline double difftime(time_t t1, time_t t2) { return _difftime32(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime32(t); } static inline struct tm* localtime(const time_t *t) { return _localtime32(t); }
From: Alex Henrie alexhenrie24@gmail.com
Needed to compile Tera Term. --- include/msvcrt/time.h | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/include/msvcrt/time.h b/include/msvcrt/time.h index a6f80dfb56f..e1d914fea0d 100644 --- a/include/msvcrt/time.h +++ b/include/msvcrt/time.h @@ -97,6 +97,7 @@ static inline errno_t ctime_s(char *res, size_t len, const __time64_t *t) { retu static inline double difftime(time_t t1, time_t t2) { return _difftime64(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime64(t); } static inline struct tm* localtime(const time_t *t) { return _localtime64(t); } +static inline errno_t localtime_s(struct tm *res, const time_t *t) { return _localtime64_s(res, t); } static inline time_t mktime(struct tm *tm) { return _mktime64(tm); } static inline time_t time(time_t *t) { return _time64(t); } #elif defined(_UCRT) @@ -105,6 +106,7 @@ static inline errno_t ctime_s(char *res, size_t len, const __time32_t *t) { retu static inline double difftime(time_t t1, time_t t2) { return _difftime32(t1, t2); } static inline struct tm* gmtime(const time_t *t) { return _gmtime32(t); } static inline struct tm* localtime(const time_t *t) { return _localtime32(t); } +static inline errno_t localtime_s(struct tm *res, const time_t *t) { return _localtime32_s(res, t); } static inline time_t mktime(struct tm *tm) { return _mktime32(tm); } static inline time_t time(time_t *t) { return _time32(t); } #endif
This merge request was approved by Piotr Caban.