From bb5ebf17248d1d389525d4fcd9e238fb13b695bf Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Apr 2003 20:34:38 +0000 Subject: [PATCH] simplify CEILF, FLOORF, FABSF stuff --- src/mesa/main/imports.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h index 5207b0124f4..51b19ba23e3 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 -- 2.30.2