postgresql/src/include
Andres Freund ec8a30ef2a Change various Gin*Is* macros to return 0/1.
Returning the direct result of bit arithmetic, in a macro intended to be
used in a boolean manner, can be problematic if the return value is
stored in a variable of type 'bool'. If bool is implemented using C99's
_Bool, that can lead to comparison failures if the variable is then
compared again with the expression (see ginStepRight() for an example
that fails), as _Bool forces the result to be 0/1. That happens in some
configurations of newer MSVC compilers.  It's also problematic when
storing the result of such an expression in a narrower type.

Several gin macros have been declared in that style since gin's initial
commit in 8a3631f8d8.

There's a lot more macros like this, but this is the only one causing
regression test failures; and I don't want to commit and backpatch a
larger patch with lots of conflicts just before the next set of minor
releases.

Discussion: 20150811154237.GD17575@awork2.anarazel.de
Backpatch: All supported branches
2016-03-27 17:47:55 +02:00
..
access Change various Gin*Is* macros to return 0/1. 2016-03-27 17:47:55 +02:00
bootstrap pgindent run for 9.5 2015-05-23 21:35:49 -04:00
catalog Move DATA entry to correct position 2016-02-15 16:37:16 -08:00
commands Rework internals of changing a type's ownership 2015-12-17 14:25:41 -03:00
common pgindent run for 9.5 2015-05-23 21:35:49 -04:00
datatype Define integer limits independently from the system definitions. 2015-04-02 17:43:35 +02:00
executor Fix some issues in new hashtable size calculations in nodeHash.c. 2015-10-04 14:06:51 -04:00
foreign Allow foreign and custom joins to handle EvalPlanQual rechecks. 2015-12-08 12:54:33 -05:00
lib Avoid use of float arithmetic in bipartite_match.c. 2015-08-23 13:02:19 -04:00
libpq Don't send protocol messages to a shm_mq that no longer exists. 2015-10-16 09:49:08 -04:00
mb Teach UtfToLocal/LocalToUtf to support algorithmic encoding conversions. 2015-05-14 22:27:12 -04:00
nodes Add defenses against putting expanded objects into Const nodes. 2016-01-21 12:55:59 -05:00
optimizer Still more fixes for planner's handling of LATERAL references. 2015-12-11 14:22:20 -05:00
parser Create new ParseExprKind for use by policy expressions. 2015-07-29 15:41:00 -07:00
port Call xlc __isync() after, not before, associated compare-and-swap. 2016-02-19 22:48:04 -05:00
portability Use mmap MAP_NOSYNC option to limit shared memory writes 2015-03-21 22:06:19 -04:00
postmaster Pass extra data to bgworkers, and use this to fix parallel contexts. 2015-11-05 12:21:00 -05:00
regex Suppress compiler warnings about useless comparison of unsigned to zero. 2016-02-15 17:11:52 -05:00
replication logical decoding: Fix handling of large old tuples with replica identity full. 2016-03-05 18:02:20 -08:00
rewrite RLS refactoring 2015-09-15 15:49:40 -04:00
snowball Update copyright for 2015 2015-01-06 11:43:47 -05:00
storage Introduce durable_rename() and durable_link_or_rename(). 2016-03-09 18:53:53 -08:00
tcop pgindent run for 9.5 2015-05-23 21:35:49 -04:00
tsearch Fix statically allocated struct with FLEXIBLE_ARRAY_MEMBER member. 2015-02-20 17:50:18 -05:00
utils Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. 2016-03-15 13:19:57 -04:00
.gitignore Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
c.h Fix more typos in comments. 2015-05-20 19:45:43 +03:00
fmgr.h Fix comment in fmgr.h to refer to actual function used. 2015-06-15 23:21:03 -04:00
funcapi.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
getaddrinfo.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
getopt_long.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
Makefile Install all headers for the new atomics API. 2014-10-02 16:52:21 +02:00
miscadmin.h Perform an immediate shutdown if the postmaster.pid file is removed. 2015-10-06 17:15:27 -04:00
pg_config.h.in Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. 2016-03-15 13:19:57 -04:00
pg_config.h.win32 Cope if platform declares mbstowcs_l(), but not locale_t, in <xlocale.h>. 2016-03-15 13:19:57 -04:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_ext.h.win32 Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Define integer limits independently from the system definitions. 2015-04-02 17:43:35 +02:00
pg_getopt.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pg_trace.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
pgstat.h pgindent run for 9.5 2015-05-23 21:35:49 -04:00
pgtar.h Adopt the GNU convention for handling tar-archive members exceeding 8GB. 2015-11-21 20:21:32 -05:00
pgtime.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
port.h Redesign tablesample method API, and do extensive code review. 2015-07-25 14:39:00 -04:00
postgres.h Support "expanded" objects, particularly arrays, for better performance. 2015-05-14 12:08:49 -04:00
postgres_ext.h pgindent run for 9.4 2014-05-06 12:12:18 -04:00
postgres_fe.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
rusagestub.h Update copyright for 2015 2015-01-06 11:43:47 -05:00
windowapi.h Update copyright for 2015 2015-01-06 11:43:47 -05:00