postgresql/src/include/common
Jacob Champion 8934f2136c Add pg_add_size_overflow() and friends
Commit 600086f47 added (several bespoke copies of) size_t addition with
overflow checks to libpq. Move this to common/int.h, along with
its subtraction and multiplication counterparts.

pg_neg_size_overflow() is intentionally omitted; I'm not sure we should
add SSIZE_MAX to win32_port.h for the sake of a function with no
callers.

Reviewed-by: Chao Li <li.evan.chao@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAOYmi%2B%3D%2BpqUd2MUitvgW1pAJuXgG_TKCVc3_Ek7pe8z9nkf%2BAg%40mail.gmail.com
2025-11-24 09:59:38 -08:00
..
archive.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
base64.h Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
blkreftable.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
checksum_helper.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
compression.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
config_info.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
connect.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
controldata_utils.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
cryptohash.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
fe_memutils.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
file_perm.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
file_utils.h Replace off_t by pgoff_t in I/O routines 2025-11-13 12:41:40 +09:00
hashfn.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
hashfn_unstable.h Silence warning in older versions of Valgrind 2025-02-24 18:03:29 +07:00
hmac.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
int.h Add pg_add_size_overflow() and friends 2025-11-24 09:59:38 -08:00
int128.h Extend int128.h to support more numeric code. 2025-08-07 15:49:24 +01:00
ip.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
jsonapi.h Be clearer about when jsonapi's need_escapes is needed 2025-01-19 09:09:58 -05:00
keywords.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
kwlookup.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
link-canary.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
logging.h Replace pg_restrict by standard restrict 2025-10-29 07:52:58 +01:00
md5.h Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
oauth-common.h Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
openssl.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
parse_manifest.h pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
percentrepl.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
pg_lzcompress.h Apply PGDLLIMPORT markings broadly. 2022-04-08 08:16:38 -04:00
pg_prng.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
relpath.h Change relpath() et al to return path by value 2025-02-25 09:02:07 -05:00
restricted_token.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
saslprep.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
scram-common.h Use 'void *' for arbitrary buffers, 'uint8 *' for byte arrays 2025-05-08 22:01:25 +03:00
sha1.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
sha2.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
shortest_dec.h Update copyright for 2025 2025-01-01 11:21:55 -05:00
string.h Replace pg_restrict by standard restrict 2025-10-29 07:52:58 +01:00
unicode_case.h Use C11 char16_t and char32_t for Unicode code points. 2025-10-29 14:17:13 -07:00
unicode_case_table.h Use C11 char16_t and char32_t for Unicode code points. 2025-10-29 14:17:13 -07:00
unicode_category.h Use C11 char16_t and char32_t for Unicode code points. 2025-10-29 14:17:13 -07:00
unicode_category_table.h Use C11 char16_t and char32_t for Unicode code points. 2025-10-29 14:17:13 -07:00
unicode_east_asian_fw_table.h Update Unicode data to Unicode 16.0.0 2025-04-03 12:00:09 +02:00
unicode_nonspacing_table.h Update Unicode data to Unicode 16.0.0 2025-04-03 12:00:09 +02:00
unicode_norm.h Use C11 char16_t and char32_t for Unicode code points. 2025-10-29 14:17:13 -07:00
unicode_norm_hashfunc.h Update Unicode data to Unicode 16.0.0 2025-04-03 12:00:09 +02:00
unicode_norm_table.h Update Unicode data to Unicode 16.0.0 2025-04-03 12:00:09 +02:00
unicode_normprops_table.h Update Unicode data to Unicode 16.0.0 2025-04-03 12:00:09 +02:00
unicode_version.h Update Unicode data to Unicode 16.0.0 2025-04-03 12:00:09 +02:00
username.h Update copyright for 2025 2025-01-01 11:21:55 -05:00