postgresql/src/tools
Tom Lane 7a0574b50e Fix ecpglib.h to declare bool consistently with c.h.
This completes the task begun in commit 1408d5d86, to synchronize
ECPG's exported definitions with the definition of bool used by
c.h (and, therefore, the one actually in use in the ECPG library).
On practically all modern platforms, ecpglib.h will now just
include <stdbool.h>, which should surprise nobody anymore.
That removes a header-inclusion-order hazard for ECPG clients,
who previously might get build failures or unexpected behavior
depending on whether they'd included <stdbool.h> themselves,
and if so, whether before or after ecpglib.h.

On platforms where sizeof(_Bool) is not 1 (only old PPC-based
Mac systems, as far as I know), things are still messy, as
inclusion of <stdbool.h> could still break ECPG client code.
There doesn't seem to be any clean fix for that, and given the
probably-negligible population of users who would care anymore,
it's not clear we should go far out of our way to cope with it.
This change at least fixes some header-inclusion-order hazards
for our own code, since c.h and ecpglib.h previously disagreed
on whether bool should be char or unsigned char.

To implement this with minimal invasion of ECPG client namespace,
move the choice of whether to rely on <stdbool.h> into configure,
and have it export a configuration symbol PG_USE_STDBOOL.

ecpglib.h no longer exports definitions for TRUE and FALSE,
only their lowercase brethren.  We could undo that if we get
push-back about it.

Ideally we'd back-patch this as far as v11, which is where c.h
started to rely on <stdbool.h>.  But the odds of creating problems
for formerly-working ECPG client code seem about as large as the
odds of fixing any non-working cases, so we'll just do this in HEAD.

Discussion: https://postgr.es/m/CAA4eK1LmaKO7Du9M9Lo=kxGU8sB6aL8fa3sF6z6d5yYYVe3BuQ@mail.gmail.com
2019-11-12 13:00:04 -05:00
..
editors Make Emacs perl-mode indent more like perltidy. 2019-01-13 11:32:31 -08:00
findoidjoins Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
ifaddrs Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
make_diff Remove useless whitespace at end of lines 2010-11-23 22:34:55 +02:00
msvc Fix ecpglib.h to declare bool consistently with c.h. 2019-11-12 13:00:04 -05:00
perlcheck Fix whitespace 2018-06-27 08:03:54 +02:00
pginclude For all ppc compilers, implement compare_exchange and fetch_add with asm. 2019-10-18 20:20:52 -07:00
pgindent Add dummy_index_am to src/test/modules/ 2019-09-25 12:11:12 +09:00
PerfectHash.pm Make our perfect hash functions be valid C++. 2019-05-31 10:40:00 -04:00
RELEASE_CHANGES Fix incorrect use of term HEAD for Git 2019-10-07 09:44:17 +02:00
ccsym tools/ccsym: update for modern versions of gcc 2015-01-20 13:02:58 -05:00
check_bison_recursion.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00
codelines Fix remaining stray references to CVS. 2010-09-22 19:51:39 -04:00
copyright.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00
find_badmacros Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
find_static Fix omission of -X (--no-psqlrc) in some psql invocations. 2015-12-28 11:46:43 -05:00
find_typedef Refer to OS X as "macOS", except for the port name which is still "darwin". 2016-09-25 15:40:57 -04:00
fix-old-flex-code.pl Replace @postgresql.org with @lists.postgresql.org for mailinglists 2019-01-19 19:06:35 +01:00
gen_keywordlist.pl Initial pgperltidy run for v12. 2019-05-22 13:36:19 -04:00
git-external-diff Preserve information on use of git-external-diff 2018-05-24 23:45:31 +09:30
git_changelog Fix incorrect use of term HEAD for Git 2019-10-07 09:44:17 +02:00
make_ctags Improve missing-program error handling in make_ctags and make_etags. 2019-01-13 13:33:50 -05:00
make_etags Improve missing-program error handling in make_ctags and make_etags. 2019-01-13 13:33:50 -05:00
make_mkid Add another pgdefine path check, and a cvs-git change. 2011-08-26 21:52:35 -04:00
pgtest pgtest: run clean, build, and check stages separately 2018-07-28 15:34:06 -04:00
testint128.c Update copyright for 2019 2019-01-02 12:44:25 -05:00
valgrind.supp Revert "Add valgrind suppressions for wcsrtombs optimizations" 2019-01-19 20:49:51 +01:00
version_stamp.pl Stamp HEAD as 13devel. 2019-07-01 12:50:55 -04:00
win32tzlist.pl Update copyright for 2019 2019-01-02 12:44:25 -05:00