| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> | 
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | taking stdbool.h into use | 
| Date: | 2017-08-16 04:36:09 | 
| Message-ID: | 3a0fe7e1-5ed1-414b-9230-53bbc0ed1f49@2ndquadrant.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
Some not so long time ago, it was discussed to look into taking
stdbool.h into use.  The reason was that third-party libraries (perl?,
ldap?, postgis?) are increasingly doing so, and having incompatible
definitions of bool could/does create a mess.
Here is a patch set that aims to accomplish that.  On the way there, it
cleans up various loose and weird uses of bool and proposes a way to
ensure that the system catalog structs get a 1-byte bool even if the
"standard" bool is not.
I have done a fair amount of testing on this, including a hand-rigged
setup where _Bool is not 1 byte.  But obviously, more and wider testing
would be very useful.
-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
| Attachment | Content-Type | Size | 
|---|---|---|
| 0001-Fix-bool-int-type-confusion.patch | text/plain | 763 bytes | 
| 0002-Change-TRUE-FALSE-to-true-false.patch | text/plain | 177.3 KB | 
| 0003-Remove-TRUE-and-FALSE.patch | text/plain | 1.3 KB | 
| 0004-Remove-BoolPtr-type.patch | text/plain | 561 bytes | 
| 0005-Make-casting-between-bool-and-GinTernaryValue-more-r.patch | text/plain | 2.4 KB | 
| 0006-Add-bool8-typedef-for-system-catalog-structs.patch | text/plain | 24.1 KB | 
| 0007-Avoid-use-of-bool-in-thread_test.c.patch | text/plain | 2.8 KB | 
| 0008-Use-stdbool.h-if-available.patch | text/plain | 12.8 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Thomas Munro | 2017-08-16 04:58:04 | Re: proposal: psql: check env variable PSQL_PAGER | 
| Previous Message | David Rowley | 2017-08-16 03:51:54 | Re: Fixup some misusage of appendStringInfo and friends |