aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-03-04 22:08:40 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-03-04 22:08:40 +0000
commit9a8644a68281a2a24e318b2660d3968f7ee55fbc (patch)
tree116b25c1de63e88e725d7fa372734bee756f1607 /src
parent38da2203a931a9aa9a729ead975cf4077039a1f0 (diff)
downloadpostgresql-9a8644a68281a2a24e318b2660d3968f7ee55fbc.tar.gz
postgresql-9a8644a68281a2a24e318b2660d3968f7ee55fbc.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.
Diffstat (limited to 'src')
-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 d80b3d4ef49..a5373da6109 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.115.2.1 2006/04/24 20:36:41 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.115.2.2 2009/03/04 22:08:40 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 */