From b6acca66965bcb285de12fd0644ae06e5c8a7680 Mon Sep 17 00:00:00 2001 From: Eryk Wieliczko Date: Tue, 28 Dec 2010 14:24:04 +0100 Subject: [PATCH] msvcrt: Implement _ftime64_s and _ftime32_s. --- dlls/msvcr100/msvcr100.spec | 4 ++-- dlls/msvcr80/msvcr80.spec | 4 ++-- dlls/msvcr90/msvcr90.spec | 4 ++-- dlls/msvcrt/msvcrt.spec | 4 ++-- dlls/msvcrt/time.c | 28 ++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 8 deletions(-) diff --git a/dlls/msvcr100/msvcr100.spec b/dlls/msvcr100/msvcr100.spec index 64dc69a7f1..0d1ffa1dd2 100644 --- a/dlls/msvcr100/msvcr100.spec +++ b/dlls/msvcr100/msvcr100.spec @@ -659,9 +659,9 @@ @ cdecl -ret64 _ftelli64(ptr) msvcrt._ftelli64 @ stub _ftelli64_nolock @ cdecl _ftime32(ptr) msvcrt._ftime32 -@ stub _ftime32_s +@ cdecl _ftime32_s(ptr) msvcrt._ftime32_s @ cdecl _ftime64(ptr) msvcrt._ftime64 -@ stub _ftime64_s +@ cdecl _ftime64_s(ptr) msvcrt._ftime64_s @ cdecl -ret64 _ftol() msvcrt._ftol @ cdecl _fullpath(ptr str long) msvcrt._fullpath @ cdecl _futime32(long ptr) msvcrt._futime32 diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec index e28079af5e..da36e24870 100644 --- a/dlls/msvcr80/msvcr80.spec +++ b/dlls/msvcr80/msvcr80.spec @@ -500,9 +500,9 @@ @ cdecl -ret64 _ftelli64(ptr) msvcrt._ftelli64 @ stub _ftelli64_nolock @ cdecl _ftime32(ptr) msvcrt._ftime32 -@ stub _ftime32_s +@ cdecl _ftime32_s(ptr) msvcrt._ftime32_s @ cdecl _ftime64(ptr) msvcrt._ftime64 -@ stub _ftime64_s +@ cdecl _ftime64_s(ptr) msvcrt._ftime64_s @ cdecl -ret64 _ftol() msvcrt._ftol @ cdecl _fullpath(ptr str long) msvcrt._fullpath @ cdecl _futime32(long ptr) msvcrt._futime32 diff --git a/dlls/msvcr90/msvcr90.spec b/dlls/msvcr90/msvcr90.spec index 94e32ff01f..578e6fbfce 100644 --- a/dlls/msvcr90/msvcr90.spec +++ b/dlls/msvcr90/msvcr90.spec @@ -492,9 +492,9 @@ @ cdecl -ret64 _ftelli64(ptr) msvcrt._ftelli64 @ stub _ftelli64_nolock @ cdecl _ftime32(ptr) msvcrt._ftime32 -@ stub _ftime32_s +@ cdecl _ftime32_s(ptr) msvcrt._ftime32_s @ cdecl _ftime64(ptr) msvcrt._ftime64 -@ stub _ftime64_s +@ cdecl _ftime64_s(ptr) msvcrt._ftime64_s @ cdecl -ret64 _ftol() msvcrt._ftol @ cdecl _fullpath(ptr str long) msvcrt._fullpath @ cdecl _futime32(long ptr) msvcrt._futime32 diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec index a12941eea7..efec11fe86 100644 --- a/dlls/msvcrt/msvcrt.spec +++ b/dlls/msvcrt/msvcrt.spec @@ -444,9 +444,9 @@ @ cdecl -ret64 _ftelli64(ptr) MSVCRT__ftelli64 @ cdecl _ftime(ptr) MSVCRT__ftime @ cdecl _ftime32(ptr) MSVCRT__ftime32 -# stub _ftime32_s +@ cdecl _ftime32_s(ptr) MSVCRT__ftime32_s @ cdecl _ftime64(ptr) MSVCRT__ftime64 -# stub _ftime64_s +@ cdecl _ftime64_s(ptr) MSVCRT__ftime64_s @ cdecl -ret64 _ftol() ntdll._ftol @ cdecl -ret64 _ftol2() ntdll._ftol @ cdecl -ret64 _ftol2_sse() ntdll._ftol #FIXME: SSE variant should be implemented diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 41501566f2..9dc2a3ed5e 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -601,6 +601,20 @@ void CDECL MSVCRT__ftime64(struct MSVCRT___timeb64 *buf) buf->dstflag = (tzid == TIME_ZONE_ID_DAYLIGHT?1:0); } +/********************************************************************* + * _ftime64_s (MSVCRT.@) + */ +int CDECL MSVCRT__ftime64_s(struct MSVCRT___timeb64 *buf) +{ + if( !MSVCRT_CHECK_PMT( buf != NULL ) ) + { + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + MSVCRT__ftime64(buf); + return 0; +} + /********************************************************************* * _ftime32 (MSVCRT.@) */ @@ -615,6 +629,20 @@ void CDECL MSVCRT__ftime32(struct MSVCRT___timeb32 *buf) buf->dstflag = buf64.dstflag; } +/********************************************************************* + * _ftime32_s (MSVCRT.@) + */ +int CDECL MSVCRT__ftime32_s(struct MSVCRT___timeb32 *buf) +{ + if( !MSVCRT_CHECK_PMT( buf != NULL ) ) + { + *MSVCRT__errno() = MSVCRT_EINVAL; + return MSVCRT_EINVAL; + } + MSVCRT__ftime32(buf); + return 0; +} + /********************************************************************* * _ftime (MSVCRT.@) */ -- 2.32.0.93.g670b81a890