summaryrefslogtreecommitdiff
path: root/hints
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2014-08-31 09:21:30 -0400
committerJarkko Hietaniemi <jhi@iki.fi>2014-08-31 12:14:24 -0400
commite014a478acd9c2ad735f654343a1a60746337cb2 (patch)
tree134876200f269f6b9950deaf16ffe233cf493baa /hints
parent25c46df8dc6aa595a691c33917e6457c632a40aa (diff)
downloadperl-e014a478acd9c2ad735f654343a1a60746337cb2.tar.gz
Detect HAS_AIX_POWL_NEG_BASE_BUG in hints/aix.sh
Diffstat (limited to 'hints')
-rw-r--r--hints/aix.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/hints/aix.sh b/hints/aix.sh
index 675cfa6f96..74e9efc127 100644
--- a/hints/aix.sh
+++ b/hints/aix.sh
@@ -544,4 +544,28 @@ if [ -f "/opt/freeware/include/gdbm/dbm.h" ] ||
i_gdbm='undef'
i_gdbmndbm='undef'
fi
+
+# Some releases (and patch levels) of AIX have a broken powl().
+case "$uselongdouble" in
+define)
+ echo "Checking if your powl() is broken..." >&4
+ cat > powl$$.c <<EOF
+#include <math.h>
+#include <stdio.h>
+int main() {
+ printf("%Lg\n", powl(-3.0L, 2.0L));
+}
+EOF
+ $cc -qlongdouble -o powl$$ powl$$.c -lm
+ case `./powl$$` in
+ 9) echo "Your powl() is working correctly." >&4 ;;
+ *)
+ ccflags="$ccflags -DHAS_AIX_POWL_NEG_BASE_BUG"
+ echo "Your powl() is broken." >&4
+ ;;
+ esac
+ rm -f powl$$.c powl$$
+ ;;
+esac
+
# EOF