summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2003-04-03 20:34:38 +0000
committerBrian Paul <brian.paul@tungstengraphics.com>2003-04-03 20:34:38 +0000
commitbb5ebf17248d1d389525d4fcd9e238fb13b695bf (patch)
treef4aa6cba161105daad172f59a2abb7d7ccb1c0d6 /src
parent0983163fde91f1026146903155fd414725a79879 (diff)
simplify CEILF, FLOORF, FABSF stuff
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/imports.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 5207b0124f..51b19ba23e 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -1,4 +1,4 @@
-/* $Id: imports.h,v 1.19 2003/03/17 15:13:43 brianp Exp $ */
+/* $Id: imports.h,v 1.20 2003/04/03 20:34:38 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -272,22 +272,19 @@ static INLINE int IS_INF_OR_NAN( float x )
*** FLOORF: floor of float
*** FABSF: absolute value of float
***/
-#if defined(__sparc__) || defined(__NeXT__) /* XXX improve? */
-#define CEILF(x) ceil(x)
-#define FLOORF(x) floor(x)
-#define FABSF(x) fabs(x)
-#elif defined(__WIN32__) || defined(__IBMC__) || defined(__IBMCPP__)
-#define CEILF(x) ((GLfloat) ceil(x))
-#define FLOORF(x) ((GLfloat) floor(x))
-#define FABSF(x) ((GLfloat) fabs(x))
-#elif defined(XFree86LOADER) && defined(IN_MODULE)
+#if defined(XFree86LOADER) && defined(IN_MODULE)
#define CEILF(x) ((GLfloat) xf86ceil(x))
#define FLOORF(x) ((GLfloat) xf86floor(x))
#define FABSF(x) ((GLfloat) xf86fabs(x))
-#else
+#elif defined(__gnu_linux__)
+/* C99 functions */
#define CEILF(x) ceilf(x)
#define FLOORF(x) floorf(x)
#define FABSF(x) fabsf(x)
+#else
+#define CEILF(x) ((GLfloat) ceil(x))
+#define FLOORF(x) ((GLfloat) floor(x))
+#define FABSF(x) ((GLfloat) fabs(x))
#endif