On Sat, 14 Dec 2024, Pali Rohár wrote:
This allows to define in lib-common/*.def.in files symbols with I386
stdcall @<num> suffixes and therefore have one common def file for all
platforms.
---
mingw-w64-crt/Makefile.am | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index 27c18eebd774..2bbc26adb364 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -4263,13 +4263,13 @@ lib32/%.def: lib-common/%.def.in
$(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P
-I$(top_srcdir)/def-include -DDEF_I386 > $@
lib64/%.def: lib-common/%.def.in
- $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P
-I$(top_srcdir)/def-include -DDEF_X64 > $@
+ $(MKDIR_P) $(@D) && $(CPP) -x c $< -Wp,-w -undef -P
-I$(top_srcdir)/def-include -DDEF_X64 | sed -E 's/^([^ ]+)@[0-9]+( |$$)/\1\2/' > $@
What's the purpose of the second group, ( |$$), here - why can't we just
leave it out and skip the \2 bit in the replacement?
Complexity wise, I think this bit looks acceptable to me though.
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public