git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 2a0faed) | patch
Use stdbool.h if suitable
2018年3月23日 00:42:25 +0000 (20:42 -0400)
2018年3月23日 00:42:25 +0000 (20:42 -0400)
commit 9a95a77d9d5d3003d2d67121f2731b6e5fc37336
Use stdbool.h if suitable

Using the standard bool type provided by C allows some recent compilers
and debuggers to give better diagnostics. Also, some extension code and
third-party headers are increasingly pulling in stdbool.h, so it's
probably saner if everyone uses the same definition.

But PostgreSQL code is not prepared to handle bool of a size other than
1, so we keep our own old definition if we encounter a stdbool.h with a
bool of a different size. (Among current build farm members, this only
applies to old macOS versions on PowerPC.)

To check that the used bool is of the right size, add a static
assertions about size of GinTernaryValue vs bool. This is currently the
only place that assumes that bool and char are of the same size.

Discussion: https://www.postgresql.org/message-id/flat/3a0fe7e1-5ed1-414b-9230-53bbc0ed1f49@2ndquadrant.com
src/backend/utils/adt/tsginidx.c diff | blob | blame | history
src/include/access/gin.h diff | blob | blame | history
src/include/c.h diff | blob | blame | history
src/include/pg_config.h.win32 diff | blob | blame | history
src/pl/plperl/plperl.h diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /