aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund <andres@anarazel.de>2014-09-18 09:59:10 +0200
committerAndres Freund <andres@anarazel.de>2014-09-18 09:59:10 +0200
commit7e3f728353fa9b36c7f98b6ec447d3f1b8deec14 (patch)
treed7b6fe57f65cf1eb8da46cd232578860d897fc2b
parentf7d6759ec2df9ad10b65aea359a27789e16a353b (diff)
downloadpostgresql-7e3f728353fa9b36c7f98b6ec447d3f1b8deec14.tar.gz
postgresql-7e3f728353fa9b36c7f98b6ec447d3f1b8deec14.zip
Fix configure check for %z printf support after INT64_MODIFIER changes.
The PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT test was broken by ce486056ecd28050. Among others it made the UINT64_FORMAT macro to be defined in c.h, instead of directly being defined by configure. This lead to the replacement printf being used on all platforms for a while. Which seems to work, because this was only used due to different profiles ;) Fix by relying on INT64_MODIFIER instead.
-rw-r--r--config/c-library.m43
-rwxr-xr-xconfigure3
2 files changed, 4 insertions, 2 deletions
diff --git a/config/c-library.m4 b/config/c-library.m4
index 4821a612921..f40db6a1ee7 100644
--- a/config/c-library.m4
+++ b/config/c-library.m4
@@ -327,7 +327,8 @@ int main()
*/
bufz[0] = '\0'; /* in case snprintf fails to emit anything */
snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
- snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
+ snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
+ (unsigned PG_INT64_TYPE) ~((size_t) 0));
if (strcmp(bufz, buf64) != 0)
return 1;
return 0;
diff --git a/configure b/configure
index 4918f95736e..dac8e49084e 100755
--- a/configure
+++ b/configure
@@ -13201,7 +13201,8 @@ int main()
*/
bufz[0] = '\0'; /* in case snprintf fails to emit anything */
snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
- snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
+ snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
+ (unsigned PG_INT64_TYPE) ~((size_t) 0));
if (strcmp(bufz, buf64) != 0)
return 1;
return 0;