Following up with an initial patch
Not sure if this is ideal because this will be used over the MSVC version.
I can add it to a c source as an emulation if that suits better

diff --git a/mingw-w64-headers/crt/time.h b/mingw-w64-headers/crt/time.h
index 7f5bbb78..405a9f1d 100644
--- a/mingw-w64-headers/crt/time.h
+++ b/mingw-w64-headers/crt/time.h
@@ -129,7 +129,9 @@ extern "C" {
   struct tm *__cdecl _localtime32(const __time32_t *_Time)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _SECIMP errno_t __cdecl _localtime32_s (struct tm *_Tm,const __time32_t
*_Time);
   size_t __cdecl strftime(char * __restrict__ _Buf,size_t
_SizeInBytes,const char * __restrict__ _Format,const struct tm *
__restrict__ _Tm);
-  _CRTIMP size_t __cdecl _strftime_l(char * __restrict__ _Buf,size_t
_Max_size,const char * __restrict__ _Format,const struct tm * __restrict__
_Tm,_locale_t _Locale);
+  __forceinline size_t __cdecl _strftime_l(char * __restrict__ _Buf,size_t
_Max_size,const char * __restrict__ _Format,const struct tm * __restrict__
_Tm,_locale_t _Locale) {
+    return strftime(_Buf, _Max_size, _Format, _Tm);
+  }
   _CRTIMP char *__cdecl _strdate(char *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;
   _SECIMP errno_t __cdecl _strdate_s (char *_Buf,size_t _SizeInBytes);
   _CRTIMP char *__cdecl _strtime(char *_Buffer)
__MINGW_ATTRIB_DEPRECATED_SEC_WARN;

On Mon, May 22, 2017 at 12:18 PM, Martell Malone <[email protected]>
wrote:

> Thanks for spotting that strangely MSDN seems to think it does exist.
> https://docs.microsoft.com/en-gb/cpp/c-runtime-library/
> reference/strftime-wcsftime-strftime-l-wcsftime-l
> I have no problem in doing an emulation for "strftime_l".
> I would rather not use random msvcrt versions :)
>
> On Mon, May 22, 2017 at 12:14 PM, Liu Hao <[email protected]> wrote:
>
>> On 2017/5/22 18:43, JonY wrote:
>> > On 05/22/2017 07:57 AM, Liu Hao wrote:
>> >> On 2017/5/22 2:05, Martell Malone wrote:
>> >>> Context: libc++ uses strftime_l now
>> >>>
>> >>> Please Review
>> >> The DEF files are generated from DLLs. I don't have Win10 at hand so I
>> >> have asked jon_y on IRC to update them.
>> >>
>> >
>> > Win10 msvcrt doesn't have strftime_l, checked on 1607.
>> Thanks for confirmation.
>>
>> On my Windows 7 the function `_strftime_l` is available in
>> MSVCR{80,90,100,110,120}.DLL, but is not available in MSVCR{T,70}.DLL.
>> So the patch can't be applied here.
>>
>> When I took my last look at libcxx it required MSVCR90 to build. I am
>> not sure which version of MSVCR* libcxx requires today but I am afraid
>> it can't be built with only MSVCRT. That is, in order to build libcxx
>> you have to *replace* the default `-lmsvcrt` with `-lmsvcr90` (MSVCR90
>> is fragile so I suggest you use `-lmsvcr100`). In the case of GCC this
>> can be done by dumping GCC's default specs file, modifying it, then
>> building use the modified specs.
>>
>> --
>> Best regards,
>> LH_Mouse
>>
>>
>> ------------------------------------------------------------
>> ------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> Mingw-w64-public mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
>>
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to