Обсуждение: pgsql: Add #define INT64_MODIFIER for the printf length modifier for 64
Add #define INT64_MODIFIER for the printf length modifier for 64-bit ints. We have had INT64_FORMAT and UINT64_FORMAT for a long time, but that's not good enough if you want something more exotic, like "%20lld". Abhijit Menon-Sen, per Andres Freund's suggestion. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/ce486056ecd28050f367894a2b5aad3656d37511 Modified Files -------------- config/c-library.m4 | 32 +++++++++++++++--------------- configure | 44 +++++++++++++++++------------------------ configure.in | 21 ++++++++------------ src/include/c.h | 3 +++ src/include/pg_config.h.in | 7 ++----- src/include/pg_config.h.win32 | 8 ++------ 6 files changed, 49 insertions(+), 66 deletions(-)
Hi, On 2014-08-21 06:57:20 +0000, Heikki Linnakangas wrote: > Add #define INT64_MODIFIER for the printf length modifier for 64-bit ints. > > We have had INT64_FORMAT and UINT64_FORMAT for a long time, but that's not > good enough if you want something more exotic, like "%20lld". > > Abhijit Menon-Sen, per Andres Freund's suggestion. Unfortunately this patch broke at least PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT because that uses UINT64_FORMAT. I only noticed because I noticed pg_vsnprintf()s in the profile. Which I didn't use to see ;) Abhijit: I'll later push a fix for PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT, but it'd good if you could check whether a configure before/after this commit changes other uintended things. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Re: pgsql: Add #define INT64_MODIFIER for the printf length modifier for 64
От
Abhijit Menon-Sen
Дата:
At 2014-09-17 17:59:19 +0200, andres@2ndquadrant.com wrote: > > Abhijit: I'll later push a fix for PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT, > but it'd good if you could check whether a configure before/after this > commit changes other uintended things. I just ran configure on a clean tree before and after Heikki's commit (#ce4860) and diff'ed the results. The problem you fixed is the only problem I see on my Linux machine. Also the only other instances of INT64_FORMAT in config/ are now in the test itself, i.e. safe. -- Abhijit