On Fri, 26 Mar 2021, Liu Hao wrote:

在 2021/3/26 上午4:56, Martin Storsjö 写道:

diff --git a/mingw-w64-headers/crt/stdio.h b/mingw-w64-headers/crt/stdio.h
(...)
      int _flag;
      int _file;


These fields have been changed to `long`s in UCRT (although there is no difference in the representation),

Sure, maybe

and `_flag` has been renamed to the plural form `_flags`. How about updating them as well?

Hmm.

The thing is that since this struct actually isn't available in the public UCRT headers (where it's a pretty opaque struct containing only the first member), I'm not sure what code we should try to be compatible with.

The only cases where one could have preexisting code that accesses these fields, is for old mingw headers targeting msvcrt.dll, or older MSVC versions targeting msvcrXX.dll (or statically linked).

As there's no code that could be using the new UCRT spelling using any public headers, there's nothing we can try to remain compatible with in that case, so we'd only be setting new predecent (i.e. if building with mingw headers, and iff targeting UCRT, then access the field with a different name).

I.e., I'm a bit hesitant about whether we should be doing this at all, or if we should follow suit and make it a similar struct containing only the first member instead?

// Martin

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

Reply via email to