[Mingw-users] Yet another compilation problem with building gcc 7.3.0

Zurück zum Archiv-Index

Eli Zaretskii eliz****@gnu*****
Fri Jun 29 15:26:04 JST 2018


> From: David Gressett <DGres****@amli-*****>
> Date: Thu, 28 Jun 2018 21:52:07 -0500
> 
> (this message has been double-spaced to keep Microsoft Outlook from merging lines)

(May I suggest to switch to a saner MUA?)

> ../../../src/gcc-7.3.0/gcc/ada/rtinit.c:195:44: error: '_O_U16TEXT' was not declared in this scope
>               __gnat_current_ccs_encoding = _O_U16TEXT;
> 
> The other two undefined items were _O_WTEXT and _O_U8TEXT.
> For all three of these, the compiler suggested _O_TEXT as an alternative.
> rtinit.c includes <fcntl.h> which defines the three undefined items:
> 
> #if (__MSVCRT_VERSION__ >= 0x0800)
> #define _O_WTEXT	0x10000
> #define _O_U16TEXT	0x20000
> #define _O_U8TEXT	0x40000
> #endif
> 
> fcntl.h includes _mingw.h which includes mscrtver.h, which defines a default value for __MSVCRT_VERSION__
> 
> The default value is 0x0600, so unless an overriding #define produces a larger value, these constants will be undefined.

AFAIU, the above means that the Ada compiler has dropped support of
Windows versions before Vista, and the compiler you produce will be
unable to run on those older versions as it does on Windows 7 and
later.  Unless, that is, the source has some fallback for those older
versions (and _O_TEXT sounds like a good idea to me up front), but I
didn't look at the sources to see if they do have such a fallback, and
I don't really understand what that will do, since UTF-16 text will
not be supported that way.

If you never intend to have your compiler to run on older systems,
just define __MSVCRT_VERSION__ to the higher number, I'd say.

Keith will probably have a better insight.




More information about the MinGW-Users mailing list
Zurück zum Archiv-Index