Content-Length: 288535 | pFad | http://github.com/postgrespro/postgres/commit/7e3f728353fa9b36c7f98b6ec447d3f1b8deec14

C3 Fix configure check for %z printf support after INT64_MODIFIER changes. · postgrespro/postgres@7e3f728 · GitHub
Skip to content

Commit 7e3f728

Browse files
committed
Fix configure check for %z printf support after INT64_MODIFIER changes.
The PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT test was broken by ce48605. 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.
1 parent f7d6759 commit 7e3f728

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

config/c-library.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,8 @@ int main()
327327
*/
328328
bufz[0] = '\0'; /* in case snprintf fails to emit anything */
329329
snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
330-
snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
330+
snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
331+
(unsigned PG_INT64_TYPE) ~((size_t) 0));
331332
if (strcmp(bufz, buf64) != 0)
332333
return 1;
333334
return 0;

configure

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13201,7 +13201,8 @@ int main()
1320113201
*/
1320213202
bufz[0] = '\0'; /* in case snprintf fails to emit anything */
1320313203
snprintf(bufz, sizeof(bufz), "%zu", ~((size_t) 0));
13204-
snprintf(buf64, sizeof(buf64), UINT64_FORMAT, (PG_INT64_TYPE) ~((size_t) 0));
13204+
snprintf(buf64, sizeof(buf64), "%" INT64_MODIFIER "u",
13205+
(unsigned PG_INT64_TYPE) ~((size_t) 0));
1320513206
if (strcmp(bufz, buf64) != 0)
1320613207
return 1;
1320713208
return 0;

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/7e3f728353fa9b36c7f98b6ec447d3f1b8deec14

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy