From 59156ad1b24140279d1db6e758878d6a6d2f107f Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 4 Mar 2009 22:08:20 +0000 Subject: =?UTF-8?q?Put=20back=20our=20old=20workaround=20for=20machines=20?= =?UTF-8?q?that=20declare=20cbrt()=20in=20math.h=20but=20fail=20to=20provi?= =?UTF-8?q?de=20the=20function=20itself.=20=20Not=20sure=20how=20we=20esca?= =?UTF-8?q?ped=20testing=20anything=20later=20than=207.3=20on=20such=20cas?= =?UTF-8?q?es,=20but=20they=20still=20exist,=20as=20per=20Andr=C3=A9=20Vol?= =?UTF-8?q?pato's=20report=20about=20AIX=205.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/backend/utils/adt/float.c') diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 6ad06788fc4..82447385151 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.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); 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