summaryrefslogtreecommitdiff
path: root/src/mesa/main/imports.h
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2007-01-16 11:22:57 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2007-01-16 11:22:57 +0000
commit6a3fdc3a1ea6c306d9543791bf172dd1052d7382 (patch)
treec372c6daff13e435e79914c2e40dfe9d370c337b /src/mesa/main/imports.h
parent0b412f8f156b46b0e7220a2b61e0f41781769f66 (diff)
parenta03fc8277180e2171519165a724849e2254ef0b7 (diff)
Merge branch 'master' of git+ssh://keithw@git.freedesktop.org/git/mesa/mesa into vbo-0.2
Conflicts: src/mesa/array_cache/sources src/mesa/drivers/dri/i965/brw_context.c src/mesa/drivers/dri/i965/brw_draw.c src/mesa/drivers/dri/i965/brw_fallback.c src/mesa/drivers/dri/i965/brw_vs_emit.c src/mesa/drivers/dri/i965/brw_vs_tnl.c src/mesa/drivers/dri/mach64/mach64_context.c src/mesa/main/extensions.c src/mesa/main/getstring.c src/mesa/tnl/sources src/mesa/tnl/t_save_api.c src/mesa/tnl/t_save_playback.c src/mesa/tnl/t_vtx_api.c src/mesa/tnl/t_vtx_exec.c src/mesa/vbo/vbo_attrib.h src/mesa/vbo/vbo_exec_api.c src/mesa/vbo/vbo_save_api.c src/mesa/vbo/vbo_save_draw.c
Diffstat (limited to 'src/mesa/main/imports.h')
-rw-r--r--src/mesa/main/imports.h28
1 files changed, 10 insertions, 18 deletions
diff --git a/src/mesa/main/imports.h b/src/mesa/main/imports.h
index 9fb02a7e9c..19a9478f76 100644
--- a/src/mesa/main/imports.h
+++ b/src/mesa/main/imports.h
@@ -55,6 +55,15 @@ extern "C" {
#define NULL 0
#endif
+
+/** gcc -pedantic warns about long string literals, LONGSTRING silences that */
+#if !defined(__GNUC__) || (__GNUC__ < 2) || \
+ ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 7))
+# define LONGSTRING
+#else
+# define LONGSTRING __extension__
+#endif
+
/*@}*/
@@ -133,11 +142,6 @@ typedef union { GLfloat f; GLint i; } fi_type;
#define FLT_MAX_EXP 128
#endif
-/* XXX this is a bit of a hack needed for compilation within XFree86 */
-#ifndef FLT_MIN
-#define FLT_MIN (1.0e-37)
-#endif
-
/* Degrees to radians conversion: */
#define DEG2RAD (M_PI/180.0)
@@ -164,8 +168,6 @@ typedef union { GLfloat f; GLint i; } fi_type;
***/
#if 0 /* _mesa_sqrtf() not accurate enough - temporarily disabled */
# define SQRTF(X) _mesa_sqrtf(X)
-#elif defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
-# define SQRTF(X) (float) xf86sqrt((float) (X))
#else
# define SQRTF(X) (float) sqrt((float) (X))
#endif
@@ -212,8 +214,6 @@ static INLINE GLfloat LOG2(GLfloat val)
num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3;
return num.f + log_2;
}
-#elif defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
-#define LOG2(x) ((GLfloat) (xf86log(x) * 1.442695))
#else
/*
* NOTE: log_base_2(x) = log(x) / log(2)
@@ -284,15 +284,7 @@ static INLINE int GET_FLOAT_BITS( float x )
*** LDEXPF: multiply value by an integral power of two
*** FREXPF: extract mantissa and exponent from value
***/
-#if defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
-#define CEILF(x) ((GLfloat) xf86ceil(x))
-#define FLOORF(x) ((GLfloat) xf86floor(x))
-#define FABSF(x) ((GLfloat) xf86fabs(x))
-#define LOGF(x) ((GLfloat) xf86log(x))
-#define EXPF(x) ((GLfloat) xf86exp(x))
-#define LDEXPF(x,y) ((GLfloat) xf86ldexp(x,y))
-#define FREXPF(x,y) ((GLfloat) xf86frexp(x,y))
-#elif defined(__gnu_linux__)
+#if defined(__gnu_linux__)
/* C99 functions */
#define CEILF(x) ceilf(x)
#define FLOORF(x) floorf(x)