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

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 3b08d52) | patch
Use <stdint.h> and <inttypes.h> for c.h integers.
Wed, 4 Dec 2024 01:46:59 +0000 (14:46 +1300)
Wed, 4 Dec 2024 02:05:38 +0000 (15:05 +1300)
commit 962da900ac8f0927f1af2fd811ca67fa163c873a
Use <stdint.h> and <inttypes.h> for c.h integers.

Redefine our exact width types with standard C99 types and macros,
including int64_t, INT64_MAX, INT64_C(), PRId64 etc. We were already
using <stdint.h> types in a few places.

One complication is that Windows' <inttypes.h> uses format strings like
"%I64d", "%I32", "%I" for PRI*64, PRI*32, PTR*PTR, instead of mapping to
other standardized format strings like "%lld" etc as seen on other known
systems. Teach our snprintf.c to understand them.

This removes a lot of configure clutter, and should also allow 64-bit
numbers and other standard types to be used in localized messages
without casting.

Reviewed-by: Peter Eisentraut <peter@eisentraut.org>
Discussion: https://postgr.es/m/ME3P282MB3166F9D1F71F787929C0C7E7B6312%40ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM
25 files changed:
config/c-compiler.m4 diff | blob | blame | history
configure diff | blob | blame | history
configure.ac diff | blob | blame | history
meson.build diff | blob | blame | history
src/Makefile.global.in diff | blob | blame | history
src/bin/pg_waldump/pg_waldump.c diff | blob | blame | history
src/bin/pgbench/pgbench.c diff | blob | blame | history
src/include/.gitignore diff | blob | blame | history
src/include/Makefile diff | blob | blame | history
src/include/c.h diff | blob | blame | history
src/include/meson.build diff | blob | blame | history
src/include/pg_config.h.in diff | blob | blame | history
src/include/pg_config_ext.h.in [deleted file] blob | blame | history
src/include/pg_config_ext.h.meson [deleted file] blob | blame | history
src/include/port/pg_bitutils.h diff | blob | blame | history
src/include/postgres_ext.h diff | blob | blame | history
src/include/utils/dsa.h diff | blob | blame | history
src/interfaces/ecpg/ecpglib/typename.c diff | blob | blame | history
src/interfaces/ecpg/include/ecpg_config.h.in diff | blob | blame | history
src/interfaces/ecpg/include/meson.build diff | blob | blame | history
src/interfaces/ecpg/include/pgtypes_interval.h diff | blob | blame | history
src/interfaces/ecpg/include/sqltypes.h diff | blob | blame | history
src/interfaces/ecpg/test/expected/compat_informix-sqlda.c diff | blob | blame | history
src/port/pg_bitutils.c diff | blob | blame | history
src/port/snprintf.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

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