From cfe3b9d7c31e47305259d6c4109b6875df2999fa Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 4 Mar 2009 22:08:28 +0000 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/backend/utils/adt/float.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index e7d0cdd70dd..cc13d88a756 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.153 2008/01/01 19:45:52 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/utils/adt/float.c,v 1.153.2.1 2009/03/04 22:08:28 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -71,6 +71,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 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 */ -- cgit v1.2.3