Doc: improve commentary about providing our own definitions of M_PI.
authorTom Lane <[email protected]>
Sun, 8 Jan 2023 21:25:25 +0000 (16:25 -0500)
committerTom Lane <[email protected]>
Sun, 8 Jan 2023 21:25:33 +0000 (16:25 -0500)
contrib/earthdistance/earthdistance.c
src/bin/pgbench/pgbench.c
src/include/utils/float.h

index e6ebfd11ad43da8bfc84132d5abc436eed7a300b..ded048c8ac502d2abbc55ec985bd68c6cb70888c 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "utils/geo_decls.h"   /* for Point */
 
+/* X/Open (XSI) requires <math.h> to provide M_PI, but core POSIX does not */
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
 #endif
index 820b1ea09f57ecafdac0b3835ef1a722a3b3be7a..18d9c94ebd336e3e0f42acbcf730d57c2233b38f 100644 (file)
@@ -68,6 +68,7 @@
 #include "port/pg_bitutils.h"
 #include "portability/instr_time.h"
 
+/* X/Open (XSI) requires <math.h> to provide M_PI, but core POSIX does not */
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
 #endif
index 61d40af2a306995fd7b24e75b1fdae8addc3142b..7529899d63c65dc6aa18d656d4af63d8c1727b89 100644 (file)
@@ -17,8 +17,8 @@
 
 #include <math.h>
 
+/* X/Open (XSI) requires <math.h> 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