forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9a95a77
committed
Use stdbool.h if suitable
Using the standard bool type provided by C allows some recent compilersand debuggers to give better diagnostics. Also, some extension code andthird-party headers are increasingly pulling in stdbool.h, so it'sprobably saner if everyone uses the same definition.But PostgreSQL code is not prepared to handle bool of a size other than1, so we keep our own old definition if we encounter a stdbool.h with abool of a different size. (Among current build farm members, this onlyapplies to old macOS versions on PowerPC.)To check that the used bool is of the right size, add a staticassertions about size of GinTernaryValue vs bool. This is currently theonly place that assumes that bool and char are of the same size.Discussion:https://www.postgresql.org/message-id/flat/3a0fe7e1-5ed1-414b-9230-53bbc0ed1f49@2ndquadrant.com1 parent2a0faed commit9a95a77
File tree
5 files changed
+31
-10
lines changed- src
- backend/utils/adt
- include
- access
- pl/plperl
5 files changed
+31
-10
lines changedLines changed: 3 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
309 | 309 |
| |
310 | 310 |
| |
311 | 311 |
| |
312 |
| - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
313 | 315 |
| |
314 | 316 |
| |
315 | 317 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
51 | 51 |
| |
52 | 52 |
| |
53 | 53 |
| |
54 |
| - | |
55 |
| - | |
| 54 | + | |
| 55 | + | |
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
|
Lines changed: 12 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
255 | 255 |
| |
256 | 256 |
| |
257 | 257 |
| |
258 |
| - | |
259 |
| - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
260 | 265 |
| |
261 | 266 |
| |
262 | 267 |
| |
263 | 268 |
| |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
264 | 273 |
| |
265 | 274 |
| |
266 | 275 |
| |
| |||
273 | 282 |
| |
274 | 283 |
| |
275 | 284 |
| |
| 285 | + | |
276 | 286 |
| |
277 | 287 |
| |
278 | 288 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
356 | 356 |
| |
357 | 357 |
| |
358 | 358 |
| |
| 359 | + | |
| 360 | + | |
| 361 | + | |
359 | 362 |
| |
360 | 363 |
| |
361 | 364 |
| |
| |||
524 | 527 |
| |
525 | 528 |
| |
526 | 529 |
| |
| 530 | + | |
| 531 | + | |
| 532 | + | |
527 | 533 |
| |
528 | 534 |
| |
529 | 535 |
| |
| |||
606 | 612 |
| |
607 | 613 |
| |
608 | 614 |
| |
| 615 | + | |
| 616 | + | |
| 617 | + | |
609 | 618 |
| |
610 | 619 |
| |
611 | 620 |
| |
|
Lines changed: 5 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
50 | 50 |
| |
51 | 51 |
| |
52 | 52 |
| |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
53 | 58 |
| |
54 | 59 |
| |
55 | 60 |
| |
| |||
91 | 96 |
| |
92 | 97 |
| |
93 | 98 |
| |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 | 99 |
| |
100 | 100 |
| |
101 | 101 |
| |
|
0 commit comments
Comments
(0)