Fix configure check for %z printf support after INT64_MODIFIER changes.
The PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT test was broken by
ce486056ec
. 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.
This commit is contained in:
parent
f7d6759ec2
commit
7e3f728353
2 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
3
configure
vendored
3
configure
vendored
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue