[ANNOUNCEMENT] cygwin 3.2.0-0.1 (TEST)

André Bleau andre_bleau@hotmail.com
Wed Mar 10 13:43:11 GMT 2021


Takashi Yano wrote:

>On Wed, 10 Mar 2021 03:38:52 +0000
>André Bleau wrote:
>> Hi,
>> 
>> Last year, I reported a problem about console output with pcon support. For the simple test program, see:
>> https://cygwin.com/pipermail/cygwin/2020-May/244742.html
>> 
>> I was told (https://cygwin.com/pipermail/cygwin/2020-May/244745.html) that I need to inset the following lines in my program:
>> 
>> #include <windows.h>
>> ...
>> DWORD mode;
>> GetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), &mode);
>> mode |= ENABLE_VIRTUAL_TERMINAL_PROCESSING;
>> SetConsoleMode(GetStdHandle(STD_OUTPUT_HANDLE), mode);
>> 
>> It worked. 
>> 
>> Now, I just downloaded cygwin 3.2.0-0.1 and retested my program with and without the above lines. Both work correctly.
>> 
>> Are the above lines no longer necessary? In that case, it could be useful to say so in the release notes.
>
>This is due to behaviour change of pseudo console itself.
>In Win10 20H2 (and perhaps also in 2004),
>ENABLE_VIRTUAL_TERMINAL_PROCESSNG is set by default in pseudo
>console. However, older Win10 such as 1809, this flag is not
>set. Therefore, you need to set this flag explicitly.
>
>Also, in command prompt, this flag is not set even with Win10
>20H2. So, I recommend to keep this flag set for portability.

Hi Takashi,

I use Win10 2004 and I can confirm that my program needs those lines when run from cmd but not from mintty.
So that behavior change was caused by a change in Win10, not in cygwin.

As for cygwin 3.2.0-0.1, then I can only report for now that:
 make v4.3 works correctly,
 x86_64-w64-mingw32-c++ v10.2.0 works correctly,
 mintty v3.4.6 works correctly,
 bash v4.4.12(3) works correctly,
 my simple C++ console program works correctly.

-André Bleau


More information about the Cygwin mailing list