summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-08-04 03:30:10 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-08-04 03:30:10 +0000
commitdf479b6717e4300dfeb6cc51e6f6b68118fafdcd (patch)
treefa513da8813ae5bf8da8e79d8ef84a8c80343488
parent6c307f0ec927c9eb8bfcee8a4b7f7b8e12ef56be (diff)
Refactor out common pre-processor code.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@78037 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/divdc3.c4
-rw-r--r--lib/divsc3.c4
-rw-r--r--lib/divxc3.c4
-rw-r--r--lib/int_lib.h5
-rw-r--r--lib/muldc3.c4
-rw-r--r--lib/mulsc3.c4
-rw-r--r--lib/mulxc3.c4
7 files changed, 5 insertions, 24 deletions
diff --git a/lib/divdc3.c b/lib/divdc3.c
index ccdf526a8..1b19e665f 100644
--- a/lib/divdc3.c
+++ b/lib/divdc3.c
@@ -15,10 +15,6 @@
#include <math.h>
#include <complex.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
// Returns: the quotient of (a + ib) / (c + id)
double _Complex
diff --git a/lib/divsc3.c b/lib/divsc3.c
index f2529970c..bea15cdc4 100644
--- a/lib/divsc3.c
+++ b/lib/divsc3.c
@@ -15,10 +15,6 @@
#include <math.h>
#include <complex.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
// Returns: the quotient of (a + ib) / (c + id)
float _Complex
diff --git a/lib/divxc3.c b/lib/divxc3.c
index 982397f5f..4ee09b9db 100644
--- a/lib/divxc3.c
+++ b/lib/divxc3.c
@@ -17,10 +17,6 @@
#include <math.h>
#include <complex.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
// Returns: the quotient of (a + ib) / (c + id)
long double _Complex
diff --git a/lib/int_lib.h b/lib/int_lib.h
index e8365506f..3690d2ebe 100644
--- a/lib/int_lib.h
+++ b/lib/int_lib.h
@@ -19,6 +19,11 @@
// Assumption: right shift of signed negative is arithmetic shift
#include <limits.h>
+#include <math.h>
+
+#if !defined(INFINITY) && defined(HUGE_VAL)
+#define INFINITY HUGE_VAL
+#endif
// TODO: Improve this to minimal pre-processor hackish'ness.
#if defined (__SVR4) && defined (__sun)
diff --git a/lib/muldc3.c b/lib/muldc3.c
index 3549823c2..b945e8e38 100644
--- a/lib/muldc3.c
+++ b/lib/muldc3.c
@@ -15,10 +15,6 @@
#include <math.h>
#include <complex.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
// Returns: the product of a + ib and c + id
double _Complex
diff --git a/lib/mulsc3.c b/lib/mulsc3.c
index c723032cd..bc47a47ea 100644
--- a/lib/mulsc3.c
+++ b/lib/mulsc3.c
@@ -15,10 +15,6 @@
#include <math.h>
#include <complex.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
// Returns: the product of a + ib and c + id
float _Complex
diff --git a/lib/mulxc3.c b/lib/mulxc3.c
index 840e458b9..e38ab0dcf 100644
--- a/lib/mulxc3.c
+++ b/lib/mulxc3.c
@@ -17,10 +17,6 @@
#include <math.h>
#include <complex.h>
-#if !defined(INFINITY) && defined(HUGE_VAL)
-#define INFINITY HUGE_VAL
-#endif
-
// Returns: the product of a + ib and c + id
long double _Complex