From 5687e7810f1dd32ac1960e67b608c441d87bc229 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 8 Jan 2023 16:25:25 -0500 Subject: [PATCH] Doc: improve commentary about providing our own definitions of M_PI. --- contrib/earthdistance/earthdistance.c | 1 + src/bin/pgbench/pgbench.c | 1 + src/include/utils/float.h | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/earthdistance/earthdistance.c b/contrib/earthdistance/earthdistance.c index e6ebfd11ad..ded048c8ac 100644 --- a/contrib/earthdistance/earthdistance.c +++ b/contrib/earthdistance/earthdistance.c @@ -6,6 +6,7 @@ #include "utils/geo_decls.h" /* for Point */ +/* X/Open (XSI) requires to provide M_PI, but core POSIX does not */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif diff --git a/src/bin/pgbench/pgbench.c b/src/bin/pgbench/pgbench.c index 820b1ea09f..18d9c94ebd 100644 --- a/src/bin/pgbench/pgbench.c +++ b/src/bin/pgbench/pgbench.c @@ -68,6 +68,7 @@ #include "port/pg_bitutils.h" #include "portability/instr_time.h" +/* X/Open (XSI) requires to provide M_PI, but core POSIX does not */ #ifndef M_PI #define M_PI 3.14159265358979323846 #endif diff --git a/src/include/utils/float.h b/src/include/utils/float.h index 61d40af2a3..7529899d63 100644 --- a/src/include/utils/float.h +++ b/src/include/utils/float.h @@ -17,8 +17,8 @@ #include +/* X/Open (XSI) requires to provide M_PI, but core POSIX does not */ #ifndef M_PI -/* From my RH5.2 gcc math.h file - thomas 2000-04-03 */ #define M_PI 3.14159265358979323846 #endif -- 2.39.5