remove the need for C99 math (closes: #1579)
[openwrt/svn-archive/archive.git] / libs / postgresql / patches / 850-uclibc_no_cbrt.patch
1 diff -ruN postgresql-8.2.3-old/src/backend/utils/adt/float.c postgresql-8.2.3-new/src/backend/utils/adt/float.c
2 --- postgresql-8.2.3-old/src/backend/utils/adt/float.c 2006-10-05 03:40:45.000000000 +0200
3 +++ postgresql-8.2.3-new/src/backend/utils/adt/float.c 2007-04-10 23:13:16.000000000 +0200
4 @@ -110,7 +110,9 @@
5 static int float8_cmp_internal(float8 a, float8 b);
6
7 #ifndef HAVE_CBRT
8 -static double cbrt(double x);
9 +#undef cbrt
10 +#define cbrt(x) pg_cbrt(x)
11 +static double pg_cbrt(double x);
12 #endif /* HAVE_CBRT */
13
14
15 @@ -2831,7 +2833,7 @@
16 #ifndef HAVE_CBRT
17
18 static double
19 -cbrt(double x)
20 +pg_cbrt(double x)
21 {
22 int isneg = (x < 0.0);
23 double absx = fabs(x);