OSDN Git Service

simplify CEILF, FLOORF, FABSF stuff
authorBrian Paul <brian.paul@tungstengraphics.com>
Thu, 3 Apr 2003 20:34:38 +0000 (20:34 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Thu, 3 Apr 2003 20:34:38 +0000 (20:34 +0000)
src/mesa/main/imports.h

index 5207b01..51b19ba 100644 (file)
@@ -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