Commit 59156ad1 authored by Tom Lane's avatar Tom Lane

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.
parent d7d71571
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.160 2009/02/18 19:23:26 tgl Exp $ * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.161 2009/03/04 22:08:20 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -71,6 +71,15 @@ static int float4_cmp_internal(float4 a, float4 b); ...@@ -71,6 +71,15 @@ static int float4_cmp_internal(float4 a, float4 b);
static int float8_cmp_internal(float8 a, float8 b); static int float8_cmp_internal(float8 a, float8 b);
#ifndef HAVE_CBRT #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); static double cbrt(double x);
#endif /* HAVE_CBRT */ #endif /* HAVE_CBRT */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment