forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita622812
committed
Arrange to supply declarations for strtoll/strtoull if needed.
Buildfarm member dromedary is still unhappy about the recently-addedecpg "long long" tests. The reason turns out to be that it includes"-ansi" in its CFLAGS, and in their infinite wisdom Apple have decidedto hide the declarations of strtoll/strtoull in C89-compliant builds.(I find it pretty curious that they hide those function declarationswhen you can nonetheless declare a "long long" variable, but anywaythat is their behavior, both on dromedary's obsolete macOS version andthe newest and shiniest.) As a result, gcc assumes these functionsreturn "int", leading naturally to wrong results.(Looking at dromedary's past build results, it's evident that thisproblem also breaks pg_strtouint64() on 32-bit platforms; but weevidently have no regression tests that exercise that function withvalues above 32 bits.)To fix, supply declarations for these functions when the platformprovides the functions but not the declarations, using the same typeof mechanism as we use for some other similar cases.Discussion:https://postgr.es/m/151935568942.1461.14623890240535309745@wrigleys.postgresql.org1 parente2b83ff commita622812
File tree
5 files changed
+48
-0
lines changed- src/include
5 files changed
+48
-0
lines changedLines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15734 | 15734 |
| |
15735 | 15735 |
| |
15736 | 15736 |
| |
| 15737 | + | |
| 15738 | + | |
| 15739 | + | |
| 15740 | + | |
| 15741 | + | |
| 15742 | + | |
| 15743 | + | |
| 15744 | + | |
| 15745 | + | |
| 15746 | + | |
| 15747 | + | |
| 15748 | + | |
| 15749 | + | |
| 15750 | + | |
| 15751 | + | |
| 15752 | + | |
| 15753 | + | |
| 15754 | + | |
| 15755 | + | |
| 15756 | + | |
| 15757 | + | |
| 15758 | + | |
15737 | 15759 |
| |
15738 | 15760 |
| |
15739 | 15761 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1751 | 1751 |
| |
1752 | 1752 |
| |
1753 | 1753 |
| |
| 1754 | + | |
| 1755 | + | |
1754 | 1756 |
| |
1755 | 1757 |
| |
1756 | 1758 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1096 | 1096 |
| |
1097 | 1097 |
| |
1098 | 1098 |
| |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1099 | 1107 |
| |
1100 | 1108 |
| |
1101 | 1109 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
173 | 181 |
| |
174 | 182 |
| |
175 | 183 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
122 | 122 |
| |
123 | 123 |
| |
124 | 124 |
| |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
125 | 133 |
| |
126 | 134 |
| |
127 | 135 |
| |
|
0 commit comments
Comments
(0)