From 7490502f9937c3edabb1566e1445ac6ab9f577e9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 4 Mar 2009 22:08:20 +0000 Subject: [PATCH] =?utf8?q?Put=20back=20our=20old=20workaround=20for=20mach?= =?utf8?q?ines=20that=20declare=20cbrt()=20in=20math.h=20but=20fail=20to?= =?utf8?q?=20provide=20the=20function=20itself.=20=20Not=20sure=20how=20we?= =?utf8?q?=20escaped=20testing=20anything=20later=20than=207.3=20on=20such?= =?utf8?q?=20cases,=20but=20they=20still=20exist,=20as=20per=20Andr=C3=A9?= =?utf8?q?=20Volpato's=20report=20about=20AIX=205.3.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/backend/utils/adt/float.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 19b570d9c4..cf8b5c146a 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -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 */ -- 2.39.5