]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[readline] Fix compilation on MinGW
authorChristian Biesinger <cbiesinger@google.com>
Tue, 13 Aug 2019 19:00:58 +0000 (14:00 -0500)
committerChristian Biesinger <cbiesinger@google.com>
Tue, 13 Aug 2019 19:57:03 +0000 (14:57 -0500)
S_ISLNK should not be called outside of an #ifdef.

However, this specific call is actually unnecessary, because
linkok can only be 0 if S_ISLNK is true, per the code above.

I have sent a bug report to bug-readline, though it does not show
up in the online archive yet.

2019-08-13  Christian Biesinger  <cbiesinger@google.com>

* colors.c (_rl_print_color_indicator): Remove unnecessary
S_ISLNK check to fix compilation on MinGW.

readline/ChangeLog.gdb
readline/colors.c

index 982ef7b7107a41c508b0a20078ef880e29cbd223..01b083951edebe2aeb5394793fd21c305b6da0b2 100644 (file)
@@ -1,3 +1,8 @@
+2019-08-13  Christian Biesinger  <cbiesinger@google.com>
+
+       * colors.c (_rl_print_color_indicator): Remove unnecessary
+       S_ISLNK check to fix compilation on MinGW.
+
 2019-08-12  Tom Tromey  <tom@tromey.com>
 
        * Imported readline 8.0.
index 53758e0e7741401b3810d869af97e34b392be165..81aecfe0c830f804bcc0909ea0202104c120f26a 100644 (file)
@@ -175,7 +175,7 @@ _rl_print_color_indicator (const char *f)
 
   if (linkok == -1 && _rl_color_indicator[C_MISSING].string != NULL)
     colored_filetype = C_MISSING;
-  else if (linkok == 0 && S_ISLNK(mode) && _rl_color_indicator[C_ORPHAN].string != NULL)
+  else if (linkok == 0 && _rl_color_indicator[C_ORPHAN].string != NULL)
     colored_filetype = C_ORPHAN;       /* dangling symlink */
   else if(stat_ok != 0)
     {