在 2021-03-27 14:04, sotrdg sotrdg 写道:
inconsistency, feel free toThis is a joke.(...)If you think you can do better without adding any, performance lost and
submit pull request.You do think adding an opaque ptr would prevent me for hacking? I have already hacked not just GLIBC, but musl libc, bionic, newlib, Darwin libc, FreeBSD libc, Universal CRT, MSDOS DJGPP CRT. For other platforms, I do have emulation layer but it will provide extremely bad and potentially break code.(...)
This argument is futile, because you are unlikely to stop hacking. You are free to declare the struct yourself, and cast pointers as needed.
I believe that a struct that is defined correctly is something good to have. The previous definition doesn't match UCRT's type, so it is incorrect and has to be fixed. The MSVCRT definition was essentially needed by `_fgetc_nolock()` and `_fputtc_nolock()` which were macros that manipulated those fields directly; in UCRT they have been changed to functions, so the struct definition becomes trivial.
There is an other potential reason why the dummy definition is preferred: Even after swapping `_base` and `_cnt`, the `CRITICAL_SECTION` fiend is still missing, unless we include <winnt.h> in <stdio.h>, which I think is bad.
-- Best regards, Liu Hao
OpenPGP_signature
Description: OpenPGP digital signature
_______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
