aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-03-04 22:08:34 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-03-04 22:08:34 +0000
commit6faf291934a2713c78f84558aa4805334dbe04b0 (patch)
tree08ff0a8ab9c5b84d3c7c6830bd0b4ff274c20d44
parentc5d6081f0ead4146b8102b5089d155de4973aef9 (diff)
downloadpostgresql-6faf291934a2713c78f84558aa4805334dbe04b0.tar.gz
postgresql-6faf291934a2713c78f84558aa4805334dbe04b0.zip
Put back our old workaround for machines that declare cbrt() in math.h but
fail to provide the function itself. Not sure how we escaped testing anything later than 7.3 on such cases, but they still exist, as per André Volpato's report about AIX 5.3.
-rw-r--r--src/backend/utils/adt/float.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c
index 81d724e499e..0326544d47b 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.130.2.1 2007/09/19 22:31:51 neilc Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.130.2.2 2009/03/04 22:08:34 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -110,6 +110,15 @@ static int float4_cmp_internal(float4 a, float4 b);
static int float8_cmp_internal(float8 a, float8 b);
#ifndef HAVE_CBRT
+/*
+ * Some machines (in particular, some versions of AIX) have an extern
+ * declaration for cbrt() in <math.h> but fail to provide the actual
+ * function, which causes configure to not set HAVE_CBRT. Furthermore,
+ * their compilers spit up at the mismatch between extern declaration
+ * and static definition. We work around that here by the expedient
+ * of a #define to make the actual name of the static function different.
+ */
+#define cbrt my_cbrt
static double cbrt(double x);
#endif /* HAVE_CBRT */