public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "André Bleau" <andre_bleau@hotmail.com>
To: "cygwin@cygwin.com" <cygwin@cygwin.com>
Subject: Re: [ANNOUNCEMENT] cygwin 3.2.0-0.1 (TEST)
Date: Wed, 10 Mar 2021 13:43:11 +0000	[thread overview]
Message-ID: <DM5PR19MB0986D703B804EC6C207FCCDB93919@DM5PR19MB0986.namprd19.prod.outlook.com> (raw)
In-Reply-To: <20210310203146.7107c223f5ebdfc037751e55@nifty.ne.jp>

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

      reply	other threads:[~2021-03-10 13:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-09 11:01 Corinna Vinschen via Cygwin-announce
2021-03-10  3:38 ` André Bleau
2021-03-10 11:06   ` Corinna Vinschen
2021-03-10 11:31   ` Takashi Yano
2021-03-10 13:43     ` André Bleau [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DM5PR19MB0986D703B804EC6C207FCCDB93919@DM5PR19MB0986.namprd19.prod.outlook.com \
    --to=andre_bleau@hotmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).