Commit ffd52e5
committed
Work around NaN signbit bug on Solaris 11.4 (re: 3dfab7f)
On Solaris 11.4, when ksh is compiled with Solaris Studio cc (but
not with gcc), signbit(NAN) returns true and signbit(-NAN) returns
false! Which is of course precisely backward. This was showing up
as some regression test failures in arith.sh, as of the referenced
commit.
src/lib/libast/features/float:
- Add a test for this bug.
src/lib/libast/sfio/sfcvt.c:
- This is the function where float values are converted to strings
for printf and the arithmetic subsystem. Compile in a workaround
(just invert the sign again) if the bug is detected.1 parent c57dc7a commit ffd52e5
2 files changed
Lines changed: 16 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1082 | 1082 | | |
1083 | 1083 | | |
1084 | 1084 | | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
105 | | - | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
250 | 252 | | |
251 | 253 | | |
252 | 254 | | |
253 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
254 | 258 | | |
255 | 259 | | |
256 | 260 | | |
| |||
0 commit comments