From 962da900ac8f0927f1af2fd811ca67fa163c873a Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Wed, 4 Dec 2024 14:46:59 +1300 Subject: Use and 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 types in a few places. One complication is that Windows' 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 Discussion: https://postgr.es/m/ME3P282MB3166F9D1F71F787929C0C7E7B6312%40ME3P282MB3166.AUSP282.PROD.OUTLOOK.COM --- src/include/postgres_ext.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include/postgres_ext.h') diff --git a/src/include/postgres_ext.h b/src/include/postgres_ext.h index 240ad4e93bf..202eb049622 100644 --- a/src/include/postgres_ext.h +++ b/src/include/postgres_ext.h @@ -23,7 +23,7 @@ #ifndef POSTGRES_EXT_H #define POSTGRES_EXT_H -#include "pg_config_ext.h" +#include /* * Object ID is a fundamental type in Postgres. @@ -44,7 +44,7 @@ typedef unsigned int Oid; /* Define a signed 64-bit integer type for use in client API declarations. */ -typedef PG_INT64_TYPE pg_int64; +typedef int64_t pg_int64; /* * Identifiers of error message fields. Kept here to keep common -- cgit v1.2.3