]> Savannah Git Hosting - gnulib.git/commitdiff
dfa: Revert breaking gawk.
authorBruno Haible <bruno@clisp.org>
Fri, 24 Jul 2020 12:25:30 +0000 (14:25 +0200)
committerBruno Haible <bruno@clisp.org>
Fri, 24 Jul 2020 12:25:30 +0000 (14:25 +0200)
Reported by Arnold Robbins <arnold@skeeve.com>.

* lib/dfa.c (compare): Don't reference the _GL_CMP macro.

ChangeLog
lib/dfa.c

index 3203040d0f7987fe22dbd9df45f22fd2f2e938ca..23e8099821275ef93d3033940de74ab04d64047b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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.
+
 2020-07-23  Bruno Haible  <bruno@clisp.org>
 
        Optimize three-valued comparison between integers.
index 1d2d4045740244b49f0d819373f796908251f840..e79d882d764c617b26962a5f2dc37478888f8f9e 100644 (file)
--- 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