diff options
| author | Heikki Linnakangas | 2014-08-21 06:56:44 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2014-08-21 06:56:44 +0000 |
| commit | ce486056ecd28050f367894a2b5aad3656d37511 (patch) | |
| tree | 338a69224ad29e0532658f4a5580211338778f83 /src/include/c.h | |
| parent | fa069822f5a02bbbe46bada0b6e420a89c5f7484 (diff) | |
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.
Diffstat (limited to 'src/include/c.h')
| -rw-r--r-- | src/include/c.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/c.h b/src/include/c.h index a48a57a42b3..2ceaaf6c1d7 100644 --- a/src/include/c.h +++ b/src/include/c.h @@ -288,6 +288,9 @@ typedef unsigned long long int uint64; #define UINT64CONST(x) ((uint64) x) #endif +/* snprintf format strings to use for 64-bit integers */ +#define INT64_FORMAT "%" INT64_MODIFIER "d" +#define UINT64_FORMAT "%" INT64_MODIFIER "u" /* Select timestamp representation (float8 or int64) */ #ifdef USE_INTEGER_DATETIMES |
