projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0d42f7
)
(sortlines_temp): Redo previous change, since I'm no longer confident
author
Paul Eggert
<eggert@cs.ucla.edu>
Fri, 7 Oct 2005 18:48:28 +0000
(18:48 +0000)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Fri, 7 Oct 2005 18:48:28 +0000
(18:48 +0000)
that the m4/stdbool.m4 patch suffices.
src/sort.c
patch
|
blob
|
history
diff --git
a/src/sort.c
b/src/sort.c
index
7b736c1
..
7de1a41
100644
(file)
--- 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];
}