On Sat, 27 Apr 2024, Pali Rohár wrote:

Add 4 new macros FIXED_SIZE_SYMBOLS, NO_I64_FIXED_SIZE,
NO_FIXED_SIZE_64_ALIAS and NO_TIME_ALIAS to distinguish
between different crt versions.

This change adds new symbol aliases which were missing.
There is no symbol change or removal.

For reference here is list of changes between individual outputs from:

 cpp -x c $FILE -Wp,-w -undef -P -Imingw-w64-crt/def-include -D$PLAT | sed -E 
's/\s*;.*//' | LC_ALL=C sort -u

diff --git a/mingw-w64-crt/def-include/msvcrt-common.def.in 
b/mingw-w64-crt/def-include/msvcrt-common.def.in
index 3e2c674d3699..26aa13e6b661 100644
--- a/mingw-w64-crt/def-include/msvcrt-common.def.in
+++ b/mingw-w64-crt/def-include/msvcrt-common.def.in
@@ -119,6 +119,9 @@ ADD_UNDERSCORE(ungetch)
ADD_UNDERSCORE(unlink)
#ifndef UCRTBASE
ADD_UNDERSCORE(utime)
+#else
+F32(utime == _utime32)
+F64(utime == _utime64)
#endif
ADD_UNDERSCORE(wcsdup)
ADD_UNDERSCORE(wcsicmp)
@@ -197,6 +200,160 @@ _strtoimax_l == _strtoi64_l
_strtoumax_l == _strtoui64_l
#endif

+; This is list of find symbol aliases, every CRT library has either find 
symbols with SIZE suffix or without them
+#ifdef FIXED_SIZE_SYMBOLS
+F32(_findfirst32 == _findfirst)
+F64(_findfirst64i32 == _findfirst)
+#ifndef NO_I64_FIXED_SIZE
+F32(_findfirst32i64 == _findfirsti64)
+#ifndef NO_FIXED_SIZE_64_ALIAS
+F64(_findfirst64 == _findfirsti64)

I think this patch looks reasonable; the diff of the def files looks good. I didn't try to follow this macro soup in detail, but I guess it's reasonable as long as the output is correct.

Overall, I'm ok with this patch set now, thanks! (I just had a few minor nits about the commit messages.) I'll leave the naming discussion regarding "alias"/redirect to Liu Hao. (Also, note the name "alias" exists in multiple commit messages, and also in macros in this patch.)

I'll be away for the rest of the week, so unless someone else wants to apply it once the naming discussion has been settled, I can probably get to it sometime next week.

(Also, if someone else wants to apply it, note that there are changes to Makefile.am that need regenerating Makefile.in after each change.)

// Martin

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to