bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dfa.c change - please revert


From: Bruno Haible
Subject: Re: dfa.c change - please revert
Date: Fri, 24 Jul 2020 14:27:30 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-179-generic; KDE/5.18.0; x86_64; ; )

Hi Arnold,

> Please revert this, as it breaks compilation in gawk.

This patch should do it (keeping the optimized variant of the 3-way comparison).

Btw, how did you notice the breakage so rapidly? Are you scanning the commits
or the mails, or do you have a continuous integration?


2020-07-24  Bruno Haible  <bruno@clisp.org>

        dfa: Revert breaking gawk.
        Reported by Arnold Robbins <arnold@skeeve.com>.
        * lib/dfa.c (compare): Don't reference the _GL_CMP macro.

diff --git a/lib/dfa.c b/lib/dfa.c
index 1d2d404..e79d882 100644
--- a/lib/dfa.c
+++ b/lib/dfa.c
@@ -2466,7 +2466,7 @@ static int
 compare (const void *a, const void *b)
 {
   position const *p = a, *q = b;
-  return _GL_CMP (p->index, q->index);
+  return (p->index > q->index) - (p->index < q->index);
 }
 
 static void




reply via email to

[Prev in Thread] Current Thread [Next in Thread]