pgsql: Add #define INT64_MODIFIER for the printf length modifier for 64

Started by Heikki Linnakangasalmost 12 years ago3 messagescomitters
Jump to latest
#1Heikki Linnakangas
heikki.linnakangas@enterprisedb.com

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(-)

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#2Andres Freund
andres@anarazel.de
In reply to: Heikki Linnakangas (#1)
Re: pgsql: Add #define INT64_MODIFIER for the printf length modifier for 64

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

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers

#3Abhijit Menon-Sen
ams@2ndQuadrant.com
In reply to: Andres Freund (#2)
Re: pgsql: Add #define INT64_MODIFIER for the printf length modifier for 64

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

--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers