Fix compiling issue on 32-bit environments. V4_4_STABLE
authorTatsuo Ishii <ishii@postgresql.org>
Wed, 17 Sep 2025 23:24:13 +0000 (08:24 +0900)
committerTatsuo Ishii <ishii@postgresql.org>
Wed, 17 Sep 2025 23:42:54 +0000 (08:42 +0900)
commit7731e800c41f3f0e2e4162656031e857706d7e05
treebddee9617f100d6e7869b5a9147a8da30b74dafc
parentb4e19e2fb5ce357704a27c84e4c3b185cd4e30c6
Fix compiling issue on 32-bit environments.

It is reported that compiling src/parser/snprintf.c on 32-bit
environments fails due to undefined functions (isnan() and
ininf()). They come from math.h so include it.  snprintf.c was
imported from PostgreSQL long time ago. If we look into the original
file (src/port/snprintf.c) it actually has "#include <math.h>"
already. Including math.h was provided as a pull request:
https://github.com/pgpool/pgpool2/pull/128

I also added a minor modification to the patch to reorder the
positions of include files.

Author: Gyorgy Sarvari <skandigraun@gmail.com>
Discussion: https://www.postgresql.org/message-id/20250917.194736.353755422175293639.ishii%40postgresql.org
Backpatch-through: v4.2
src/parser/snprintf.c