summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2005-10-07 18:48:28 +0000
committerPaul Eggert <eggert@cs.ucla.edu>2005-10-07 18:48:28 +0000
commit4778617abc445f23af539204213f3a40991a7566 (patch)
treeec9f072e6fc6a65cc19f1ac24b903e3485d9a41e /src
parenta0d42f7861b5c5df7d625bb311486dad054ad9e3 (diff)
downloadcoreutils-4778617abc445f23af539204213f3a40991a7566.tar.xz
(sortlines_temp): Redo previous change, since I'm no longer confident
that the m4/stdbool.m4 patch suffices.
Diffstat (limited to 'src')
-rw-r--r--src/sort.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sort.c b/src/sort.c
index 7b736c152..7de1a41fe 100644
--- a/src/sort.c
+++ b/src/sort.c
@@ -1720,7 +1720,10 @@ sortlines_temp (struct line *lines, size_t nlines, struct line *temp)
{
if (nlines == 2)
{
- bool swap = (0 < compare (&lines[-1], &lines[-2]));
+ /* Declare `swap' as int, not bool, to work around a bug
+ <http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html>
+ in the IBM xlc 6.0.0.0 compiler in 64-bit mode. */
+ int swap = (0 < compare (&lines[-1], &lines[-2]));
temp[-1] = lines[-1 - swap];
temp[-2] = lines[-2 + swap];
}