pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Get rid of useless/dangerous redefinition of bool in ECPG. 2+ messages / 1 participants [nested] [flat]
* pgsql: Get rid of useless/dangerous redefinition of bool in ECPG. @ 2019-10-25 16:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2019-10-25 16:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Get rid of useless/dangerous redefinition of bool in ECPG. pgtypeslib_extern.h contained fallback definitions of "bool", "FALSE", and "TRUE". The latter two are just plain unused, and have been for awhile. The former came into play only if there wasn't a macro definition of "bool", which is true only if we aren't using <stdbool.h>. However, it then defined bool as "char"; since commit d26a810eb that conflicts with c.h's desire to use "unsigned char". We'd missed seeing any bad effects of that due to accidental header inclusion order choices, but dddf4cdc3 exposed that it was problematic. To fix, let's just get rid of these definitions. They should not be needed because everyplace in Postgres should be relying on c.h to provide a definition for type bool. (Note that despite its name, pgtypeslib_extern.h isn't exposed to any outside code; we don't install it.) This doesn't fully resolve the issue, because ecpglib.h is doing similar things, but that seems to require more thought to fix. Back-patch to v12 where d26a810eb came in, to forestall any unpleasant surprises from future back-patched bug fixes. Discussion: https://postgr.es/m/CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com Branch ------ REL_12_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4a61aa4a945f5737c65d288077101ed202488e9a Modified Files -------------- src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Get rid of useless/dangerous redefinition of bool in ECPG. @ 2019-10-25 16:17 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 2+ messages in thread From: Tom Lane @ 2019-10-25 16:17 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Get rid of useless/dangerous redefinition of bool in ECPG. pgtypeslib_extern.h contained fallback definitions of "bool", "FALSE", and "TRUE". The latter two are just plain unused, and have been for awhile. The former came into play only if there wasn't a macro definition of "bool", which is true only if we aren't using <stdbool.h>. However, it then defined bool as "char"; since commit d26a810eb that conflicts with c.h's desire to use "unsigned char". We'd missed seeing any bad effects of that due to accidental header inclusion order choices, but dddf4cdc3 exposed that it was problematic. To fix, let's just get rid of these definitions. They should not be needed because everyplace in Postgres should be relying on c.h to provide a definition for type bool. (Note that despite its name, pgtypeslib_extern.h isn't exposed to any outside code; we don't install it.) This doesn't fully resolve the issue, because ecpglib.h is doing similar things, but that seems to require more thought to fix. Back-patch to v12 where d26a810eb came in, to forestall any unpleasant surprises from future back-patched bug fixes. Discussion: https://postgr.es/m/CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1408d5d869925c8ea7ca01c2644e8903fbab23de Modified Files -------------- src/interfaces/ecpg/pgtypeslib/pgtypeslib_extern.h | 12 ------------ 1 file changed, 12 deletions(-) ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-10-25 16:17 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-10-25 16:17 pgsql: Get rid of useless/dangerous redefinition of bool in ECPG. Tom Lane <tgl@sss.pgh.pa.us> 2019-10-25 16:17 pgsql: Get rid of useless/dangerous redefinition of bool in ECPG. Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox