在 2024-12-10 05:59, Pali Rohár 写道:
What about having one def file kernel32.def.in where would be also
@STDCALL suffixes and when building non-I386 variant, the build process
will filter that file over sed 's/@[0-9]*$//' and then process by cpp
preprocessor? (Or first process by cpp and then by sed)

This would remove ordinals too. @ is part of a symbol and is a special case.

The C preprocessor treats @ as a single token on its own, so probably will not work properly. Can we concatenate an identifier with @ ? how should we ensure that CPP will not insert arbitrary space between them?


This could decrease the need to have more def files for the same library
(e.g. kernel32) and also maintenance of different variants of def files.

Well indeed, I don't disagree. The existent duplication is probably not good, however we don't know how to do that in a cleaner way, instead of a dirtier way.

This is an example about the cost of evolution [1], and a mistake of someone 
else [2].

[1] https://pmc.ncbi.nlm.nih.gov/articles/PMC430849/
[2] https://devblogs.microsoft.com/oldnewthing/20060403-59/?p=31693



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

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

Reply via email to