Enable styling by default on Cygwin

Message ID 20200102130810.11771-1-jon.turney@dronecode.org.uk
State New, archived
Headers

Commit Message

Jon Turney Jan. 2, 2020, 1:08 p.m. UTC
  Cygwin meets the expectations of gdb for styling (if TERM is set and not
'DUMB', the terminal supports 'ANSI' (EMCA-48) escape sequences.

gdb/ChangeLog:

2020-01-02  Jon Turney  <jon.turney@dronecode.org.uk>

	* cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.
---
 gdb/ChangeLog       | 3 +--
 gdb/cli/cli-style.c | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)
  

Comments

Joel Brobecker Jan. 5, 2020, 6:16 a.m. UTC | #1
Hi Jon,

On Thu, Jan 02, 2020 at 01:08:10PM +0000, Jon Turney wrote:
> Cygwin meets the expectations of gdb for styling (if TERM is set and not
> 'DUMB', the terminal supports 'ANSI' (EMCA-48) escape sequences.
> 
> gdb/ChangeLog:
> 
> 2020-01-02  Jon Turney  <jon.turney@dronecode.org.uk>
> 
> 	* cli/cli-style.c: Set cli_styling to 'true' in the Cygwin build.

If indeed you confirm Cygwin has all the necessary features,
you patch does make sense to me. Approved.


> ---
>  gdb/ChangeLog       | 3 +--
>  gdb/cli/cli-style.c | 2 +-
>  2 files changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/gdb/cli/cli-style.c b/gdb/cli/cli-style.c
> index 5535d67408..bedc95aaf7 100644
> --- a/gdb/cli/cli-style.c
> +++ b/gdb/cli/cli-style.c
> @@ -25,7 +25,7 @@
>  
>  /* True if styling is enabled.  */
>  
> -#if defined (__MSDOS__) || defined (__CYGWIN__)
> +#if defined (__MSDOS__)
>  bool cli_styling = false;
>  #else
>  bool cli_styling = true;
> -- 
> 2.21.0
  

Patch

diff --git a/gdb/cli/cli-style.c b/gdb/cli/cli-style.c
index 5535d67408..bedc95aaf7 100644
--- a/gdb/cli/cli-style.c
+++ b/gdb/cli/cli-style.c
@@ -25,7 +25,7 @@ 
 
 /* True if styling is enabled.  */
 
-#if defined (__MSDOS__) || defined (__CYGWIN__)
+#if defined (__MSDOS__)
 bool cli_styling = false;
 #else
 bool cli_styling = true;