* [PATCH] [readline] Fix compilation on MinGW
@ 2019-08-13 19:04 Christian Biesinger via gdb-patches
2019-08-13 19:46 ` Tom Tromey
0 siblings, 1 reply; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-08-13 19:04 UTC (permalink / raw)
To: gdb-patches; +Cc: Christian Biesinger
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 | 5 +++++
readline/colors.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/readline/ChangeLog.gdb b/readline/ChangeLog.gdb
index 982ef7b710..01b083951e 100644
--- a/readline/ChangeLog.gdb
+++ b/readline/ChangeLog.gdb
@@ -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.
diff --git a/readline/colors.c b/readline/colors.c
index 53758e0e77..81aecfe0c8 100644
--- a/readline/colors.c
+++ b/readline/colors.c
@@ -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)
{
--
2.23.0.rc1.153.gdeed80330f-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [readline] Fix compilation on MinGW
2019-08-13 19:04 [PATCH] [readline] Fix compilation on MinGW Christian Biesinger via gdb-patches
@ 2019-08-13 19:46 ` Tom Tromey
2019-08-13 19:59 ` Christian Biesinger via gdb-patches
0 siblings, 1 reply; 4+ messages in thread
From: Tom Tromey @ 2019-08-13 19:46 UTC (permalink / raw)
To: Christian Biesinger via gdb-patches; +Cc: Christian Biesinger
>>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
Christian> S_ISLNK should not be called outside of an #ifdef.
Christian> However, this specific call is actually unnecessary, because
Christian> linkok can only be 0 if S_ISLNK is true, per the code above.
Christian> I have sent a bug report to bug-readline, though it does not show
Christian> up in the online archive yet.
I didn't see it show up there. I wonder if something went wrong.
Christian> 2019-08-13 Christian Biesinger <cbiesinger@google.com>
Christian> * colors.c (_rl_print_color_indicator): Remove unnecessary
Christian> S_ISLNK check to fix compilation on MinGW.
This looks fine to me. Please check it in.
It's important to be sure to follow up with upstream readline; and to
update the patch in the local tree if Chet uses a different patch.
thank you,
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [readline] Fix compilation on MinGW
2019-08-13 19:46 ` Tom Tromey
@ 2019-08-13 19:59 ` Christian Biesinger via gdb-patches
2019-09-15 1:49 ` Christian Biesinger via gdb-patches
0 siblings, 1 reply; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-08-13 19:59 UTC (permalink / raw)
To: Tom Tromey; +Cc: Christian Biesinger via gdb-patches
On Tue, Aug 13, 2019 at 2:46 PM Tom Tromey <tom@tromey.com> wrote:
> >>>>> "Christian" == Christian Biesinger via gdb-patches <gdb-patches@sourceware.org> writes:
>
> Christian> S_ISLNK should not be called outside of an #ifdef.
> Christian> However, this specific call is actually unnecessary, because
> Christian> linkok can only be 0 if S_ISLNK is true, per the code above.
>
> Christian> I have sent a bug report to bug-readline, though it does not show
> Christian> up in the online archive yet.
>
> I didn't see it show up there. I wonder if something went wrong.
I also emailed Chet directly, hopefully that worked.
> Christian> 2019-08-13 Christian Biesinger <cbiesinger@google.com>
>
> Christian> * colors.c (_rl_print_color_indicator): Remove unnecessary
> Christian> S_ISLNK check to fix compilation on MinGW.
>
> This looks fine to me. Please check it in.
Done.
> It's important to be sure to follow up with upstream readline; and to
> update the patch in the local tree if Chet uses a different patch.
Will do.
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] [readline] Fix compilation on MinGW
2019-08-13 19:59 ` Christian Biesinger via gdb-patches
@ 2019-09-15 1:49 ` Christian Biesinger via gdb-patches
0 siblings, 0 replies; 4+ messages in thread
From: Christian Biesinger via gdb-patches @ 2019-09-15 1:49 UTC (permalink / raw)
To: Tom Tromey; +Cc: Christian Biesinger via gdb-patches
On Tue, Aug 13, 2019 at 3:58 PM Christian Biesinger
<cbiesinger@google.com> wrote:
>
> On Tue, Aug 13, 2019 at 2:46 PM Tom Tromey <tom@tromey.com> wrote:
> > It's important to be sure to follow up with upstream readline; and to
> > update the patch in the local tree if Chet uses a different patch.
>
> Will do.
It looks like Chet committed the same patch:
http://git.savannah.gnu.org/cgit/readline.git/diff/colors.c?h=devel&id=c612c3607b183ae654d6c920c729de5444fdb899
Christian
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-09-15 1:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-13 19:04 [PATCH] [readline] Fix compilation on MinGW Christian Biesinger via gdb-patches
2019-08-13 19:46 ` Tom Tromey
2019-08-13 19:59 ` Christian Biesinger via gdb-patches
2019-09-15 1:49 ` Christian Biesinger via gdb-patches
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox