diff options
author | Andres Freund <andres@anarazel.de> | 2017-10-29 22:13:54 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2017-12-12 16:55:37 -0800 |
commit | 4d6ad31257adaf8a51e1c4377d96afa656d9165f (patch) | |
tree | 71d0e8fffcaa28226dc580495273d2a428f2e94d /src/include/pg_config.h.win32 | |
parent | 95b52351fe966c93791462274dfa7af7e50d2da1 (diff) | |
download | postgresql-4d6ad31257adaf8a51e1c4377d96afa656d9165f.tar.gz |
Provide overflow safe integer math inline functions.
It's not easy to get signed integer overflow checks correct and
fast. Therefore abstract the necessary infrastructure into a common
header providing addition, subtraction and multiplication for 16, 32,
64 bit signed integers.
The new macros aren't yet used, but a followup commit will convert
several open coded overflow checks.
Author: Andres Freund, with some code stolen from Greg Stark
Reviewed-By: Robert Haas
Discussion: https://postgr.es/m/20171024103954.ztmatprlglz3rwke@alap3.anarazel.de
Diffstat (limited to 'src/include/pg_config.h.win32')
-rw-r--r-- | src/include/pg_config.h.win32 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index e192d98c5a..22d19ed794 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -515,6 +515,9 @@ /* Define to 1 if your compiler understands __builtin_constant_p. */ /* #undef HAVE__BUILTIN_CONSTANT_P */ +/* Define to 1 if your compiler understands __builtin_$op_overflow. */ +/* #undef HAVE__BUILTIN_OP_OVERFLOW */ + /* Define to 1 if your compiler understands __builtin_types_compatible_p. */ /* #undef HAVE__BUILTIN_TYPES_COMPATIBLE_P */ |