Re: [HACKERS] taking stdbool.h into use
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org, Michael Paquier <michael@paquier.xyz>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
Alvaro Herrera <alvherre@alvh.no-ip.org>,
Thomas Munro <thomas.munro@enterprisedb.com>
Date: 2018-03-21T05:51:01Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > On March 20, 2018 8:24:41 PM PDT, Michael Paquier <michael@paquier.xyz> wrote: >> Yeah, I agree with that. Just not using stdbool.h in those cases ought >> to be fine. Any platforms where sizeof(bool) is 4 involves macos older >> than 10.5 and Windows platforms using MSVC versions older than 2003 >> (didn't look further down either). > Aren't there some somewhat modern architectures where that's still the case, for performance reasons? PPC or such? Well, hydra (F16 on ppc64) has sizeof(bool) = 1. Don't have any other good datapoints handy. Presumably we'd set up configure to report what it found out, so it wouldn't take long to survey the buildfarm. regards, tom lane
Commits
-
Use stdbool.h if suitable
- 9a95a77d9d5d 11.0 landed
-
Add configure tests for stdbool.h and sizeof bool
- f20b3285340c 11.0 landed
-
Remove useless use of bit-masking macros
- d91da5ecedc8 11.0 landed
-
Change various Gin*Is* macros to return 0/1.
- af4472bcb88a 9.6.0 cited
-
Fix several possibly non-portable gaffs in record_image_ops.
- 4cbb646334b3 9.4.0 cited