Re: [HACKERS] taking stdbool.h into use

Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

From: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>, Thomas Munro <thomas.munro@enterprisedb.com>
Date: 2017-12-28T15:15:58Z
Lists: pgsql-hackers
On 12/27/17 19:47, Michael Paquier wrote:
>> For GinTernaryValue, I think it's easier to just make it the same size
>> as bool, since it doesn't go onto disk.  My earlier patch did that.  I'm
>> not sure it's worth adding more code to copy the array around.
> But on prairiedog the sizeof bool and char are different, so compilation
> would fail, no? 

An earlier patch I posted defines GinTernaryValue to be the same size as
bool, accounting for different possible sizes of bool.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


Commits

  1. Use stdbool.h if suitable

  2. Add configure tests for stdbool.h and sizeof bool

  3. Remove useless use of bit-masking macros

  4. Change various Gin*Is* macros to return 0/1.

  5. Fix several possibly non-portable gaffs in record_image_ops.