aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-03-04 22:08:53 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-03-04 22:08:53 +0000
commit4c1324589692e6cac7be294607ac3d8d9f46c2d2 (patch)
treeb76fc9a8b9e172afc5421cb9336e77d9633e7b42 /src
parent80be60530f7f372bcaa5caca02cb22cad514ee19 (diff)
downloadpostgresql-4c1324589692e6cac7be294607ac3d8d9f46c2d2.tar.gz
postgresql-4c1324589692e6cac7be294607ac3d8d9f46c2d2.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 9f0fa0de32d..7a115371c95 100644
--- a/src/backend/utils/adt/float.c
+++ b/src/backend/utils/adt/float.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.94 2003/09/25 06:58:03 petere Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/float.c,v 1.94.2.1 2009/03/04 22:08:53 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -71,6 +71,15 @@
#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 */