(CMP_WITH_IGNORE): Don't assume that the difference
authorJim Meyering <jim@meyering.net>
Mon, 21 Jan 2002 22:02:28 +0000 (22:02 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 21 Jan 2002 22:02:28 +0000 (22:02 +0000)
between two size_t values can be stored in an int; this doesn't
work, for example, on 64-bit Solaris.

src/sort.c

index ac82dcf..409071a 100644 (file)
@@ -1431,7 +1431,7 @@ keycompare (const struct line *a, const struct line *b)
              ++textb;                                                  \
            }                                                           \
                                                                        \
-         diff = (lima - texta) - (limb - textb);                       \
+         diff = (texta < lima) - (textb < limb);                       \
     }                                                                  \
   while (0)