mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 16:50:13 +01:00
Add the ability to define NO_LIBCWRAPPER to avoid libcwrapper brain damage.
If it's true that libcwrapper usage isn't necessary ever in the DllLoader world, then this code should probbaly all go away.
This commit is contained in:
parent
f236300e3a
commit
91c30771b6
3 changed files with 12 additions and 4 deletions
|
|
@ -47,7 +47,7 @@
|
|||
#define GLHEADER_H
|
||||
|
||||
|
||||
#if defined(XFree86LOADER) && defined(IN_MODULE)
|
||||
#if defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
|
||||
#include "xf86_ansic.h"
|
||||
#else
|
||||
#include <assert.h>
|
||||
|
|
|
|||
|
|
@ -71,6 +71,14 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
|
|||
#endif
|
||||
#endif
|
||||
|
||||
/* If we don't actually want to use the libcwrapper junk (even though we're
|
||||
* building an Xorg server module), then just undef IN_MODULE to signal that to
|
||||
* the following code. It's left around for now to allow compiling of newish
|
||||
* Mesa with older servers, but this whole mess should go away at some point.
|
||||
*/
|
||||
#ifdef NO_LIBCWRAPPER
|
||||
#undef IN_MODULE
|
||||
#endif
|
||||
|
||||
/**********************************************************************/
|
||||
/** \name Memory */
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ 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)
|
||||
#elif defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
|
||||
# define SQRTF(X) (float) xf86sqrt((float) (X))
|
||||
#else
|
||||
# define SQRTF(X) (float) sqrt((float) (X))
|
||||
|
|
@ -209,7 +209,7 @@ 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)
|
||||
#elif defined(XFree86LOADER) && defined(IN_MODULE) && !defined(NO_LIBCWRAPPER)
|
||||
#define LOG2(x) ((GLfloat) (xf86log(x) * 1.442695))
|
||||
#else
|
||||
/*
|
||||
|
|
@ -281,7 +281,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)
|
||||
#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))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue