在 2021-03-30 01:45, Jeremy Drake via Mingw-w64-public 写道:

Which is why I don't know that mingw-w64 is wrong here, it is doing
exactly what MS says.  However, it could provide aliases in
ucrtbase.def.in for the 'base' functions to make configure happy.

It appears that other time functions are also affected (time and ctime
were just reported on that issue).

Those functions have aliases in MSVCR*.DEFs, but I fail to see why they are 
missing in UCRT.

The proposed patch adds them so configure checks will not fail. They are added as aliases for the 32-bit variants for the 32-bit DLL, and 64-bit variants for the 64-bit DLL. However I am not sure whether this is desirable: They may also defined as (default) unconditional aliases for 64-bit variants.


--
Best regards,
Liu Hao
From e4c11c6213ab60b73cf0f2bbd69697520631159f Mon Sep 17 00:00:00 2001
From: Liu Hao <[email protected]>
Date: Tue, 30 Mar 2021 22:19:33 +0800
Subject: [PATCH] crt: Add symbols for POSIX time functions

These may satisfy configure scripts so they don't fail with undefined
references, but such functions are not meant to be called without
declaring `time_t` correctly.

Reference: https://github.com/msys2/CLANG-packages/issues/21
Signed-off-by: Liu Hao <[email protected]>
---
 mingw-w64-crt/lib-common/ucrtbase.def.in | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/mingw-w64-crt/lib-common/ucrtbase.def.in 
b/mingw-w64-crt/lib-common/ucrtbase.def.in
index eaa7e636..688decdf 100644
--- a/mingw-w64-crt/lib-common/ucrtbase.def.in
+++ b/mingw-w64-crt/lib-common/ucrtbase.def.in
@@ -2652,3 +2652,9 @@ wctrans
 wctype
 wmemcpy_s
 wmemmove_s
+; These functions may satisfy configure scripts.
+ctime == F32(_ctime32) F64(_ctime64)
+gmtime == F32(_gmtime32) F64(_gmtime64)
+localtime == F32(_localtime32) F64(_localtime64)
+mktime == F32(_mktime32) F64(_mktime64)
+time == F32(_time32) F64(_time64)
-- 
2.31.0

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to