diff --git a/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec b/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec index c0b507c3e5b..f5d4275085e 100644 --- a/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec +++ b/dlls/api-ms-win-crt-time-l1-1-0/api-ms-win-crt-time-l1-1-0.spec @@ -5,7 +5,7 @@ @ cdecl _W_Getdays() ucrtbase._W_Getdays @ cdecl _W_Getmonths() ucrtbase._W_Getmonths @ cdecl _W_Gettnames() ucrtbase._W_Gettnames -@ stub _Wcsftime +@ cdecl _Wcsftime(ptr long wstr ptr ptr) ucrtbase._Wcsftime @ cdecl __daylight() ucrtbase.__daylight @ cdecl __dstbias() ucrtbase.__dstbias @ cdecl __timezone() ucrtbase.__timezone diff --git a/dlls/msvcr110/msvcr110.spec b/dlls/msvcr110/msvcr110.spec index da9b85e476a..ef06f34c0f7 100644 --- a/dlls/msvcr110/msvcr110.spec +++ b/dlls/msvcr110/msvcr110.spec @@ -867,7 +867,7 @@ @ cdecl _W_Getdays() @ cdecl _W_Getmonths() @ cdecl _W_Gettnames() -@ stub _Wcsftime +@ cdecl _Wcsftime(ptr long wstr ptr ptr) @ cdecl _XcptFilter(long ptr) @ cdecl __AdjustPointer(ptr ptr) @ stub __BuildCatchObject diff --git a/dlls/msvcr120/msvcr120.spec b/dlls/msvcr120/msvcr120.spec index 8b02a63c25a..26a896cd13e 100644 --- a/dlls/msvcr120/msvcr120.spec +++ b/dlls/msvcr120/msvcr120.spec @@ -851,7 +851,7 @@ @ cdecl _W_Getdays() @ cdecl _W_Getmonths() @ cdecl _W_Gettnames() -@ stub _Wcsftime +@ cdecl _Wcsftime(ptr long wstr ptr ptr) @ cdecl _XcptFilter(long ptr) @ cdecl __AdjustPointer(ptr ptr) @ stub __BuildCatchObject diff --git a/dlls/msvcr120_app/msvcr120_app.spec b/dlls/msvcr120_app/msvcr120_app.spec index d30ff5ea719..afdb26c92b4 100644 --- a/dlls/msvcr120_app/msvcr120_app.spec +++ b/dlls/msvcr120_app/msvcr120_app.spec @@ -845,7 +845,7 @@ @ cdecl _W_Getdays() msvcr120._W_Getdays @ cdecl _W_Getmonths() msvcr120._W_Getmonths @ cdecl _W_Gettnames() msvcr120._W_Gettnames -@ stub _Wcsftime +@ cdecl _Wcsftime(ptr long wstr ptr ptr) msvcr120._Wcsftime @ cdecl _XcptFilter(long ptr) msvcr120._XcptFilter @ cdecl __AdjustPointer(ptr ptr) msvcr120.__AdjustPointer @ stub __BuildCatchObject diff --git a/dlls/msvcrt/time.c b/dlls/msvcrt/time.c index 93dcabc826d..480d533f32b 100644 --- a/dlls/msvcrt/time.c +++ b/dlls/msvcrt/time.c @@ -1273,16 +1273,14 @@ MSVCRT_size_t CDECL MSVCRT_strftime( char *str, MSVCRT_size_t max, const char *f return strftime_helper(str, max, format, mstm, NULL, NULL); } -/********************************************************************* - * _wcsftime_l (MSVCRT.@) - */ -MSVCRT_size_t CDECL MSVCRT__wcsftime_l( MSVCRT_wchar_t *str, MSVCRT_size_t max, - const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, MSVCRT__locale_t loc ) +static MSVCRT_size_t wcsftime_helper( MSVCRT_wchar_t *str, MSVCRT_size_t max, + const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, + MSVCRT___lc_time_data *time_data, MSVCRT__locale_t loc ) { char *s, *fmt; MSVCRT_size_t len; - TRACE("%p %ld %s %p %p\n", str, max, debugstr_w(format), mstm, loc); + TRACE("%p %ld %s %p %p %p\n", str, max, debugstr_w(format), mstm, time_data, loc); len = MSVCRT__wcstombs_l( NULL, format, 0, loc ) + 1; if (!(fmt = MSVCRT_malloc( len ))) return 0; @@ -1290,7 +1288,7 @@ MSVCRT_size_t CDECL MSVCRT__wcsftime_l( MSVCRT_wchar_t *str, MSVCRT_size_t max, if ((s = MSVCRT_malloc( max*4 ))) { - if (!MSVCRT__strftime_l( s, max*4, fmt, mstm, loc )) s[0] = 0; + if (!strftime_helper( s, max*4, fmt, mstm, time_data, loc )) s[0] = 0; len = MSVCRT__mbstowcs_l( str, s, max, loc ); MSVCRT_free( s ); } @@ -1300,13 +1298,32 @@ MSVCRT_size_t CDECL MSVCRT__wcsftime_l( MSVCRT_wchar_t *str, MSVCRT_size_t max, return len; } +/********************************************************************* + * _wcsftime_l (MSVCRT.@) + */ +MSVCRT_size_t CDECL MSVCRT__wcsftime_l( MSVCRT_wchar_t *str, MSVCRT_size_t max, + const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, MSVCRT__locale_t loc ) +{ + return wcsftime_helper(str, max, format, mstm, NULL, loc); +} + /********************************************************************* * wcsftime (MSVCRT.@) */ MSVCRT_size_t CDECL MSVCRT_wcsftime( MSVCRT_wchar_t *str, MSVCRT_size_t max, const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm ) { - return MSVCRT__wcsftime_l(str, max, format, mstm, NULL); + return wcsftime_helper(str, max, format, mstm, NULL, NULL); +} + +/********************************************************************* + * _Wcsftime (MSVCRT.@) + */ +MSVCRT_size_t CDECL _Wcsftime(MSVCRT_wchar_t *str, MSVCRT_size_t max, + const MSVCRT_wchar_t *format, const struct MSVCRT_tm *mstm, + MSVCRT___lc_time_data *time_data) +{ + return wcsftime_helper(str, max, format, mstm, time_data, NULL); } static char* asctime_buf(char *buf, const struct MSVCRT_tm *mstm) diff --git a/dlls/ucrtbase/ucrtbase.spec b/dlls/ucrtbase/ucrtbase.spec index 643aaa63df2..a0ac91b7136 100644 --- a/dlls/ucrtbase/ucrtbase.spec +++ b/dlls/ucrtbase/ucrtbase.spec @@ -44,7 +44,7 @@ @ cdecl _W_Getdays() @ cdecl _W_Getmonths() @ cdecl _W_Gettnames() -@ stub _Wcsftime +@ cdecl _Wcsftime(ptr long wstr ptr ptr) @ cdecl __AdjustPointer(ptr ptr) @ stub __BuildCatchObject @ stub __BuildCatchObjectHelper