在 2024-11-12 22:49, Lasse Collin 写道:
I understand only now that many apps use main() but ignore argv[] and instead get the args by some other method. I was too focused on porting apps written for POSIX systems. I'm sorry.
It doesn't matter. That's not your fault.
The _exit(255) trick is clearly not an acceptable default. My patch should be reverted until a better one is made. It might be that all apps that want safe argv[] for main() will need something special on Windows (like setting UTF-8 code page in manifest).
Are you requesting for a revert now?Manifests are much dirtier work. It's not like a function which we just call somewhere; it's an XML element that is to be inserted into a resource file, and each module can only contain at most one such file - multiple files don't magically merge. GCC knows about 'default-manifest.o' which may be superseded by a user-supplied one.
Pali's comments made me I wonder if we should wait and see if Microsoft will do something about this issue in 1-2 months. With bad luck even a milder fix might result in unwanted differences in command line handling between MinGW-w64 and MSVC built executables.
I second this. -- Best regards, LIU Hao
OpenPGP_signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
