summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 3a523d1d07..9f1e8555fa 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1517,6 +1517,15 @@ constant(char *name, int arg)
break;
case 'H':
if (strEQ(name, "HUGE_VAL"))
+#ifdef USE_LONG_DOUBLE
+ /* HUGE_VALL is admittedly non-POSIX but if are using long doubles
+ * we might as well use long doubles. --jhi */
+# ifdef HUGE_VALL
+ return HUGE_VALL;
+# else
+ goto not_there;
+# endif
+#endif
#ifdef HUGE_VAL
return HUGE_VAL;
#else