Index: src/mesa/main/glheader.h =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/main/glheader.h,v retrieving revision 1.65 diff -u -r1.65 glheader.h --- src/mesa/main/glheader.h 19 Sep 2005 20:12:33 -0000 1.65 +++ src/mesa/main/glheader.h 22 Sep 2005 10:53:31 -0000 @@ -47,29 +47,6 @@ #define GLHEADER_H -#if defined(XFree86LOADER) && defined(IN_MODULE) -#include "xf86_ansic.h" -#else -#include -#include -/* If we can use Compaq's Fast Math Library on Alpha */ -#if defined(__alpha__) && defined(CCPML) -#include -#else -#include -#endif -#include -#include -#include -#include -#if defined(__linux__) && defined(__i386__) -#include -#endif -#endif -#include -#include - - /* Get typedefs for uintptr_t and friends */ #if defined(_WIN32) #include @@ -79,6 +56,8 @@ #if defined(__MINGW32__) #include #endif +#elif IN_DRI_DRIVER /* defined(__linux__) || defined(__FreeBSD__) */ +#include #else #include #endif @@ -227,6 +206,7 @@ #endif +#include #if defined(BUILD_FOR_SNAP) && defined(CHECKED) # define ASSERT(X) _CHECK(X) #elif defined(DEBUG) Index: src/mesa/main/imports.h =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/main/imports.h,v retrieving revision 1.57 diff -u -r1.57 imports.h --- src/mesa/main/imports.h 19 Sep 2005 20:12:33 -0000 1.57 +++ src/mesa/main/imports.h 22 Sep 2005 10:53:33 -0000 @@ -36,6 +36,27 @@ #define IMPORTS_H +#if defined(XFree86LOADER) && defined(IN_MODULE) +#include "xf86_ansic.h" +#else +#include +#if defined(__alpha__) && defined(CCPML) +#include /* Compaq's Fast Math Library on Alpha */ +#else +#include +#endif +#include +#include +#include +#include +#if defined(__linux__) && defined(__i386__) +#include +#endif +#endif +#include +#include + + /* XXX some of the stuff in glheader.h should be moved into this file. */ #include "glheader.h" @@ -129,12 +150,6 @@ #define M_E (2.7182818284590452354) #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) @@ -643,9 +658,6 @@ extern double _mesa_pow(double x, double y); -extern float -_mesa_log2(float x); - extern int _mesa_ffs(int i); Index: src/mesa/swrast/s_tcc.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/swrast/s_tcc.c,v retrieving revision 1.4 diff -u -r1.4 s_tcc.c --- src/mesa/swrast/s_tcc.c 16 Sep 2005 04:16:48 -0000 1.4 +++ src/mesa/swrast/s_tcc.c 22 Sep 2005 10:53:38 -0000 @@ -29,11 +29,8 @@ * end up using it as a backend in mesa. */ -#include -#include - - #include "glheader.h" +#include "imports.h" #include "colormac.h" #include "context.h" #include "nvfragprog.h" Index: src/mesa/x86/gen_matypes.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/x86/gen_matypes.c,v retrieving revision 1.14 diff -u -r1.14 gen_matypes.c --- src/mesa/x86/gen_matypes.c 7 May 2005 16:59:58 -0000 1.14 +++ src/mesa/x86/gen_matypes.c 22 Sep 2005 10:53:39 -0000 @@ -32,6 +32,7 @@ * Mesa, including lighting, clipping, texture image conversion etc. */ +#include #include "main/glheader.h" #include "main/mtypes.h" #include "tnl/t_context.h" Index: src/mesa/glapi/glapi.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/glapi/glapi.c,v retrieving revision 1.95 diff -u -r1.95 glapi.c --- src/mesa/glapi/glapi.c 10 Aug 2005 23:54:15 -0000 1.95 +++ src/mesa/glapi/glapi.c 22 Sep 2005 10:53:29 -0000 @@ -50,6 +50,14 @@ +/* glapi cannot include imports.h because for DRI it is part of libGL */ +#if defined(XFree86LOADER) && defined(IN_MODULE) +#include "xf86_ansic.h" +#else +#include +#include +#endif + #include "glheader.h" #include "glapi.h" #include "glapioffsets.h" Index: src/mesa/glapi/glthread.c =================================================================== RCS file: /cvs/mesa/Mesa/src/mesa/glapi/glthread.c,v retrieving revision 1.12 diff -u -r1.12 glthread.c --- src/mesa/glapi/glthread.c 3 Aug 2005 23:05:25 -0000 1.12 +++ src/mesa/glapi/glthread.c 22 Sep 2005 10:53:29 -0000 @@ -30,6 +30,14 @@ */ +/* glapi cannot include imports.h because for DRI it is part of libGL */ +#if defined(XFree86LOADER) && defined(IN_MODULE) +#include "xf86_ansic.h" +#else +#include +#include +#endif + #include "glheader.h" #include "glthread.h"