Re: [HACKERS] taking stdbool.h into use
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Tom Lane <tgl@sss.pgh.pa.us>, Michael Paquier <michael.paquier@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, pgsql-hackers <pgsql-hackers@postgresql.org>, Thomas Munro <thomas.munro@enterprisedb.com>
Date: 2018-03-21T03:24:41Z
Lists: pgsql-hackers
On Tue, Mar 20, 2018 at 02:14:23PM -0700, Andres Freund wrote: > On 2018-03-20 17:04:22 -0400, Peter Eisentraut wrote: > > On 3/20/18 02:18, Tom Lane wrote: > > > I think it'd be worth identifying exactly which platforms have > > > sizeof(bool) different from 1. Are any of them things that anyone > > > cares about going forward? The point of this patch is to ease > > > future development of extensions, but it's unlikely any extension > > > authors care about portability onto, say, macOS 10.4 (prairiedog). > > > > I'm not sure I follow. Say we commit configure tests and discover that > > platforms A, B, and C are affected. What would we do with that > > information? I don't think we are saying we'd just break A, B, and C. > > If those are only older platforms we could just not use stdbool for > those. The likelihood of getting into conflicts with $library stdbool > uses is lower... 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). -- Michael
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