summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/ppc/divtc3.c9
-rw-r--r--lib/ppc/multc3.c9
-rw-r--r--lib/x86_64/floatdidf.c9
-rw-r--r--lib/x86_64/floatdisf.c7
-rw-r--r--lib/x86_64/floatdixf.c9
5 files changed, 28 insertions, 15 deletions
diff --git a/lib/ppc/divtc3.c b/lib/ppc/divtc3.c
index bec6b5353..dbb71ecc3 100644
--- a/lib/ppc/divtc3.c
+++ b/lib/ppc/divtc3.c
@@ -1,9 +1,14 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+/* This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ */
#include "DD.h"
#include <math.h>
+#if !defined(INFINITY) && defined(HUGE_VAL)
+#define INFINITY HUGE_VAL
+#endif /* INFINITY */
+
#define makeFinite(x) { \
(x).hi = __builtin_copysign(isinf((x).hi) ? 1.0 : 0.0, (x).hi); \
(x).lo = 0.0; \
diff --git a/lib/ppc/multc3.c b/lib/ppc/multc3.c
index d5a77b178..0944263b2 100644
--- a/lib/ppc/multc3.c
+++ b/lib/ppc/multc3.c
@@ -1,9 +1,14 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+/* This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ */
#include "DD.h"
#include <math.h>
+#if !defined(INFINITY) && defined(HUGE_VAL)
+#define INFINITY HUGE_VAL
+#endif /* INFINITY */
+
#define makeFinite(x) { \
(x).hi = __builtin_copysign(isinf((x).hi) ? 1.0 : 0.0, (x).hi); \
(x).lo = 0.0; \
diff --git a/lib/x86_64/floatdidf.c b/lib/x86_64/floatdidf.c
index ecef079b6..cce3cd514 100644
--- a/lib/x86_64/floatdidf.c
+++ b/lib/x86_64/floatdidf.c
@@ -1,7 +1,8 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+/* This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ */
-// double __floatdidf(di_int a);
+/* double __floatdidf(di_int a); */
#ifdef __x86_64__
@@ -12,4 +13,4 @@ double __floatdidf(int64_t a)
return (double)a;
}
-#endif // __x86_64__ \ No newline at end of file
+#endif /* __x86_64__ */
diff --git a/lib/x86_64/floatdisf.c b/lib/x86_64/floatdisf.c
index c22a453d4..753ba90df 100644
--- a/lib/x86_64/floatdisf.c
+++ b/lib/x86_64/floatdisf.c
@@ -1,5 +1,6 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+/* This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ */
#ifdef __x86_64__
@@ -10,4 +11,4 @@ float __floatdisf(int64_t a)
return (float)a;
}
-#endif // __x86_64__ \ No newline at end of file
+#endif /* __x86_64__ */
diff --git a/lib/x86_64/floatdixf.c b/lib/x86_64/floatdixf.c
index 73b5da9fa..569f72774 100644
--- a/lib/x86_64/floatdixf.c
+++ b/lib/x86_64/floatdixf.c
@@ -1,7 +1,8 @@
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+/* This file is distributed under the University of Illinois Open Source
+ * License. See LICENSE.TXT for details.
+ */
-// long double __floatdixf(di_int a);
+/* long double __floatdixf(di_int a); */
#ifdef __x86_64__
@@ -12,4 +13,4 @@ long double __floatdixf(int64_t a)
return (long double)a;
}
-#endif // __i386__
+#endif /* __i386__ */