Commit 508d2dea authored by Eric Anholt's avatar Eric Anholt Committed by Mike Gabriel

Remove libcwrapper usage from xorg server modules. The libcwrapper is not used in nxagent.

From c3d14036729fd186d4ec7ca1de603e1f2d174e2f Mon Sep 17 00:00:00 2001 From: Eric Anholt <anholt@freebsd.org> Date: Fri, 10 Feb 2006 22:00:30 +0000 Subject: Remove libcwrapper usage from xorg server modules. The libcwrapper is only of (marginal) use in the drivers, and that usage remains. Backported-to-NX-by: 's avatarMike Gabriel <mike.gabriel@das-netzwerkteam.de> Fixes ArcticaProject/nx-libs#246 (together with merge commit ecd335fa).
parent 62f8e50e
...@@ -556,8 +556,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 ...@@ -556,8 +556,6 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
# define ExtraLoaderDefines /**/ # define ExtraLoaderDefines /**/
#endif #endif
# define XFree86LoaderDefines /**/
#ifndef HasBsdMake #ifndef HasBsdMake
#define HasBsdMake NO #define HasBsdMake NO
#endif #endif
...@@ -584,7 +582,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8 ...@@ -584,7 +582,7 @@ IPLAN2P8_DEFS = -DUSE_IPLAN2P8
#ifndef XFree86ServerDefines #ifndef XFree86ServerDefines
# define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \ # define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \
XFree86XvDefines \ XFree86XvDefines \
XFree86LoaderDefines -DXFree86Server \ -DXFree86Server \
XFree86XvMCDefines \ XFree86XvMCDefines \
SmartScheduleDefines \ SmartScheduleDefines \
DebugDefines XFree86XResDefines \ DebugDefines XFree86XResDefines \
......
...@@ -36,9 +36,7 @@ ...@@ -36,9 +36,7 @@
** **
*/ */
#ifndef XFree86LOADER
#include <sys/types.h> #include <sys/types.h>
#endif
#ifdef CAPI #ifdef CAPI
#undef CAPI #undef CAPI
......
...@@ -1034,11 +1034,7 @@ _mesa_init_constants( GLcontext *ctx ) ...@@ -1034,11 +1034,7 @@ _mesa_init_constants( GLcontext *ctx )
/* If we're running in the X server, do bounds checking to prevent /* If we're running in the X server, do bounds checking to prevent
* segfaults and server crashes! * segfaults and server crashes!
*/ */
#if defined(XFree86LOADER) && defined(IN_MODULE)
ctx->Const.CheckArrayBounds = GL_TRUE;
#else
ctx->Const.CheckArrayBounds = GL_FALSE; ctx->Const.CheckArrayBounds = GL_FALSE;
#endif
ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS; ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS;
......
...@@ -47,11 +47,9 @@ ...@@ -47,11 +47,9 @@
#define GLHEADER_H #define GLHEADER_H
#if defined(XFree86LOADER) && defined(IN_MODULE)
#include "xf86_ansic.h"
#else
#include <assert.h> #include <assert.h>
#include <ctype.h> #include <ctype.h>
/* If we can use Compaq's Fast Math Library on Alpha */ /* If we can use Compaq's Fast Math Library on Alpha */
#if defined(__alpha__) && defined(CCPML) #if defined(__alpha__) && defined(CCPML)
#include <cpml.h> #include <cpml.h>
...@@ -65,7 +63,7 @@ ...@@ -65,7 +63,7 @@
#if defined(__linux__) && defined(__i386__) #if defined(__linux__) && defined(__i386__)
#include <fpu_control.h> #include <fpu_control.h>
#endif #endif
#endif
#include <float.h> #include <float.h>
#include <stdarg.h> #include <stdarg.h>
......
...@@ -81,33 +81,21 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg); ...@@ -81,33 +81,21 @@ extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
void * void *
_mesa_malloc(size_t bytes) _mesa_malloc(size_t bytes)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86malloc(bytes);
#else
return malloc(bytes); return malloc(bytes);
#endif
} }
/** Wrapper around either calloc() or xf86calloc() */ /** Wrapper around either calloc() or xf86calloc() */
void * void *
_mesa_calloc(size_t bytes) _mesa_calloc(size_t bytes)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86calloc(1, bytes);
#else
return calloc(1, bytes); return calloc(1, bytes);
#endif
} }
/** Wrapper around either free() or xf86free() */ /** Wrapper around either free() or xf86free() */
void void
_mesa_free(void *ptr) _mesa_free(void *ptr)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86free(ptr);
#else
free(ptr); free(ptr);
#endif
} }
/** /**
...@@ -211,9 +199,7 @@ _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize) ...@@ -211,9 +199,7 @@ _mesa_realloc(void *oldBuffer, size_t oldSize, size_t newSize)
void * void *
_mesa_memcpy(void *dest, const void *src, size_t n) _mesa_memcpy(void *dest, const void *src, size_t n)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE) #if defined(SUNOS4)
return xf86memcpy(dest, src, n);
#elif defined(SUNOS4)
return memcpy((char *) dest, (char *) src, (int) n); return memcpy((char *) dest, (char *) src, (int) n);
#else #else
return memcpy(dest, src, n); return memcpy(dest, src, n);
...@@ -224,9 +210,7 @@ _mesa_memcpy(void *dest, const void *src, size_t n) ...@@ -224,9 +210,7 @@ _mesa_memcpy(void *dest, const void *src, size_t n)
void void
_mesa_memset( void *dst, int val, size_t n ) _mesa_memset( void *dst, int val, size_t n )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE) #if defined(SUNOS4)
xf86memset( dst, val, n );
#elif defined(SUNOS4)
memset( (char *) dst, (int) val, (int) n ); memset( (char *) dst, (int) val, (int) n );
#else #else
memset(dst, val, n); memset(dst, val, n);
...@@ -250,9 +234,7 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n ) ...@@ -250,9 +234,7 @@ _mesa_memset16( unsigned short *dst, unsigned short val, size_t n )
void void
_mesa_bzero( void *dst, size_t n ) _mesa_bzero( void *dst, size_t n )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE) #if defined(__FreeBSD__)
xf86memset( dst, 0, n );
#elif defined(__FreeBSD__)
bzero( dst, n ); bzero( dst, n );
#else #else
memset( dst, 0, n ); memset( dst, 0, n );
...@@ -270,33 +252,21 @@ _mesa_bzero( void *dst, size_t n ) ...@@ -270,33 +252,21 @@ _mesa_bzero( void *dst, size_t n )
double double
_mesa_sin(double a) _mesa_sin(double a)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86sin(a);
#else
return sin(a); return sin(a);
#endif
} }
/** Wrapper around either cos() or xf86cos() */ /** Wrapper around either cos() or xf86cos() */
double double
_mesa_cos(double a) _mesa_cos(double a)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86cos(a);
#else
return cos(a); return cos(a);
#endif
} }
/** Wrapper around either sqrt() or xf86sqrt() */ /** Wrapper around either sqrt() or xf86sqrt() */
double double
_mesa_sqrtd(double x) _mesa_sqrtd(double x)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86sqrt(x);
#else
return sqrt(x); return sqrt(x);
#endif
} }
...@@ -494,9 +464,6 @@ _mesa_inv_sqrtf(float n) ...@@ -494,9 +464,6 @@ _mesa_inv_sqrtf(float n)
return x3 * r3; return x3 * r3;
#endif #endif
#elif defined(XFree86LOADER) && defined(IN_MODULE)
return 1.0F / xf86sqrt(n);
#else
return (float) (1.0 / sqrt(n)); return (float) (1.0 / sqrt(n));
#endif #endif
} }
...@@ -508,11 +475,7 @@ _mesa_inv_sqrtf(float n) ...@@ -508,11 +475,7 @@ _mesa_inv_sqrtf(float n)
double double
_mesa_pow(double x, double y) _mesa_pow(double x, double y)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86pow(x, y);
#else
return pow(x, y); return pow(x, y);
#endif
} }
...@@ -681,9 +644,7 @@ _mesa_half_to_float(GLhalfARB val) ...@@ -681,9 +644,7 @@ _mesa_half_to_float(GLhalfARB val)
char * char *
_mesa_getenv( const char *var ) _mesa_getenv( const char *var )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE) #if defined(_XBOX)
return xf86getenv(var);
#elif defined(_XBOX)
return NULL; return NULL;
#else #else
return getenv(var); return getenv(var);
...@@ -701,77 +662,49 @@ _mesa_getenv( const char *var ) ...@@ -701,77 +662,49 @@ _mesa_getenv( const char *var )
char * char *
_mesa_strstr( const char *haystack, const char *needle ) _mesa_strstr( const char *haystack, const char *needle )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strstr(haystack, needle);
#else
return strstr(haystack, needle); return strstr(haystack, needle);
#endif
} }
/** Wrapper around either strncat() or xf86strncat() */ /** Wrapper around either strncat() or xf86strncat() */
char * char *
_mesa_strncat( char *dest, const char *src, size_t n ) _mesa_strncat( char *dest, const char *src, size_t n )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strncat(dest, src, n);
#else
return strncat(dest, src, n); return strncat(dest, src, n);
#endif
} }
/** Wrapper around either strcpy() or xf86strcpy() */ /** Wrapper around either strcpy() or xf86strcpy() */
char * char *
_mesa_strcpy( char *dest, const char *src ) _mesa_strcpy( char *dest, const char *src )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strcpy(dest, src);
#else
return strcpy(dest, src); return strcpy(dest, src);
#endif
} }
/** Wrapper around either strncpy() or xf86strncpy() */ /** Wrapper around either strncpy() or xf86strncpy() */
char * char *
_mesa_strncpy( char *dest, const char *src, size_t n ) _mesa_strncpy( char *dest, const char *src, size_t n )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strncpy(dest, src, n);
#else
return strncpy(dest, src, n); return strncpy(dest, src, n);
#endif
} }
/** Wrapper around either strlen() or xf86strlen() */ /** Wrapper around either strlen() or xf86strlen() */
size_t size_t
_mesa_strlen( const char *s ) _mesa_strlen( const char *s )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strlen(s);
#else
return strlen(s); return strlen(s);
#endif
} }
/** Wrapper around either strcmp() or xf86strcmp() */ /** Wrapper around either strcmp() or xf86strcmp() */
int int
_mesa_strcmp( const char *s1, const char *s2 ) _mesa_strcmp( const char *s1, const char *s2 )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strcmp(s1, s2);
#else
return strcmp(s1, s2); return strcmp(s1, s2);
#endif
} }
/** Wrapper around either strncmp() or xf86strncmp() */ /** Wrapper around either strncmp() or xf86strncmp() */
int int
_mesa_strncmp( const char *s1, const char *s2, size_t n ) _mesa_strncmp( const char *s1, const char *s2, size_t n )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strncmp(s1, s2, n);
#else
return strncmp(s1, s2, n); return strncmp(s1, s2, n);
#endif
} }
/** Implemented using _mesa_malloc() and _mesa_strcpy */ /** Implemented using _mesa_malloc() and _mesa_strcpy */
...@@ -789,22 +722,14 @@ _mesa_strdup( const char *s ) ...@@ -789,22 +722,14 @@ _mesa_strdup( const char *s )
int int
_mesa_atoi(const char *s) _mesa_atoi(const char *s)
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86atoi(s);
#else
return atoi(s); return atoi(s);
#endif
} }
/** Wrapper around either strtod() or xf86strtod() */ /** Wrapper around either strtod() or xf86strtod() */
double double
_mesa_strtod( const char *s, char **end ) _mesa_strtod( const char *s, char **end )
{ {
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86strtod(s, end);
#else
return strtod(s, end); return strtod(s, end);
#endif
} }
/*@}*/ /*@}*/
...@@ -822,11 +747,7 @@ _mesa_sprintf( char *str, const char *fmt, ... ) ...@@ -822,11 +747,7 @@ _mesa_sprintf( char *str, const char *fmt, ... )
va_list args; va_list args;
va_start( args, fmt ); va_start( args, fmt );
va_end( args ); va_end( args );
#if defined(XFree86LOADER) && defined(IN_MODULE)
r = xf86vsprintf( str, fmt, args );
#else
r = vsprintf( str, fmt, args ); r = vsprintf( str, fmt, args );
#endif
return r; return r;
} }
...@@ -840,11 +761,7 @@ _mesa_printf( const char *fmtString, ... ) ...@@ -840,11 +761,7 @@ _mesa_printf( const char *fmtString, ... )
va_start( args, fmtString ); va_start( args, fmtString );
vsnprintf(s, MAXSTRING, fmtString, args); vsnprintf(s, MAXSTRING, fmtString, args);
va_end( args ); va_end( args );
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86printf("%s", s);
#else
fprintf(stderr,"%s", s); fprintf(stderr,"%s", s);
#endif
} }
/*@}*/ /*@}*/
...@@ -880,11 +797,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... ) ...@@ -880,11 +797,7 @@ _mesa_warning( GLcontext *ctx, const char *fmtString, ... )
debug = _mesa_getenv("MESA_DEBUG") ? GL_TRUE : GL_FALSE; debug = _mesa_getenv("MESA_DEBUG") ? GL_TRUE : GL_FALSE;
#endif #endif
if (debug) { if (debug) {
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86fprintf(stderr, "Mesa warning: %s", str);
#else
fprintf(stderr, "Mesa warning: %s", str); fprintf(stderr, "Mesa warning: %s", str);
#endif
} }
} }
...@@ -908,13 +821,8 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... ) ...@@ -908,13 +821,8 @@ _mesa_problem( const GLcontext *ctx, const char *fmtString, ... )
vsnprintf( str, MAXSTRING, fmtString, args ); vsnprintf( str, MAXSTRING, fmtString, args );
va_end( args ); va_end( args );
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
xf86fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
#else
fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str); fprintf(stderr, "Mesa %s implementation error: %s\n", MESA_VERSION_STRING, str);
fprintf(stderr, "Please report at bugzilla.freedesktop.org\n"); fprintf(stderr, "Please report at bugzilla.freedesktop.org\n");
#endif
} }
/** /**
...@@ -1015,11 +923,7 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... ) ...@@ -1015,11 +923,7 @@ _mesa_debug( const GLcontext *ctx, const char *fmtString, ... )
va_start(args, fmtString); va_start(args, fmtString);
vsnprintf(s, MAXSTRING, fmtString, args); vsnprintf(s, MAXSTRING, fmtString, args);
va_end(args); va_end(args);
#if defined(XFree86LOADER) && defined(IN_MODULE)
xf86fprintf(stderr, "Mesa: %s", s);
#else
fprintf(stderr, "Mesa: %s", s); fprintf(stderr, "Mesa: %s", s);
#endif
} }
/*@}*/ /*@}*/
...@@ -1050,11 +954,7 @@ static void * ...@@ -1050,11 +954,7 @@ static void *
default_realloc(__GLcontext *gc, void *oldAddr, size_t newSize) default_realloc(__GLcontext *gc, void *oldAddr, size_t newSize)
{ {
(void) gc; (void) gc;
#if defined(XFree86LOADER) && defined(IN_MODULE)
return xf86realloc(oldAddr, newSize);
#else
return realloc(oldAddr, newSize); return realloc(oldAddr, newSize);
#endif
} }
/** Wrapper around _mesa_free() */ /** Wrapper around _mesa_free() */
......
...@@ -217,8 +217,6 @@ typedef union { GLfloat f; GLint i; } fi_type; ...@@ -217,8 +217,6 @@ typedef union { GLfloat f; GLint i; } fi_type;
***/ ***/
#if 0 /* _mesa_sqrtf() not accurate enough - temporarily disabled */ #if 0 /* _mesa_sqrtf() not accurate enough - temporarily disabled */
# define SQRTF(X) _mesa_sqrtf(X) # define SQRTF(X) _mesa_sqrtf(X)
#elif defined(XFree86LOADER) && defined(IN_MODULE)
# define SQRTF(X) (float) xf86sqrt((float) (X))
#else #else
# define SQRTF(X) (float) sqrt((float) (X)) # define SQRTF(X) (float) sqrt((float) (X))
#endif #endif
...@@ -265,9 +263,6 @@ static INLINE GLfloat LOG2(GLfloat val) ...@@ -265,9 +263,6 @@ static INLINE GLfloat LOG2(GLfloat val)
num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3; num.f = ((-1.0f/3) * num.f + 2) * num.f - 2.0f/3;
return num.f + log_2; return num.f + log_2;
} }
#elif defined(XFree86LOADER) && defined(IN_MODULE)
#define LOG2(x) ((GLfloat) (xf86log(x) * 1.442695))
#else
/* /*
* NOTE: log_base_2(x) = log(x) / log(2) * NOTE: log_base_2(x) = log(x) / log(2)
* NOTE: 1.442695 = 1/log(2). * NOTE: 1.442695 = 1/log(2).
...@@ -275,7 +270,6 @@ static INLINE GLfloat LOG2(GLfloat val) ...@@ -275,7 +270,6 @@ static INLINE GLfloat LOG2(GLfloat val)
#define LOG2(x) ((GLfloat) (log(x) * 1.442695F)) #define LOG2(x) ((GLfloat) (log(x) * 1.442695F))
#endif #endif
/*** /***
*** IS_INF_OR_NAN: test if float is infinite or NaN *** IS_INF_OR_NAN: test if float is infinite or NaN
***/ ***/
...@@ -337,15 +331,7 @@ static INLINE int GET_FLOAT_BITS( float x ) ...@@ -337,15 +331,7 @@ static INLINE int GET_FLOAT_BITS( float x )
*** LDEXPF: multiply value by an integral power of two *** LDEXPF: multiply value by an integral power of two
*** FREXPF: extract mantissa and exponent from value *** FREXPF: extract mantissa and exponent from value
***/ ***/
#if defined(XFree86LOADER) && defined(IN_MODULE) #if defined(__gnu_linux__)
#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__)
/* C99 functions */ /* C99 functions */
#define CEILF(x) ceilf(x) #define CEILF(x) ceilf(x)
#define FLOORF(x) floorf(x) #define FLOORF(x) floorf(x)
......
...@@ -32,9 +32,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -32,9 +32,6 @@ in this Software without prior written authorization from The Open Group.
#include <nx-X11/Xosdefs.h> #include <nx-X11/Xosdefs.h>
/* the old Xfuncs.h, for pre-R6 */
#if !(defined(XFree86LOADER) && defined(IN_MODULE))
#ifdef X_USEBFUNCS #ifdef X_USEBFUNCS
void bcopy(); void bcopy();
void bzero(); void bzero();
...@@ -88,6 +85,4 @@ void bcopy(); ...@@ -88,6 +85,4 @@ void bcopy();
#define atexit(f) on_exit(f, 0) #define atexit(f) on_exit(f, 0)
#endif #endif
#endif /* !(defined(XFree86LOADER) && defined(IN_MODULE)) */
#endif /* _XFUNCS_H_ */ #endif /* _XFUNCS_H_ */
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include "glxserver.h" #include "glxserver.h"
#include <GL/glxtokens.h> #include <GL/glxtokens.h>
#include <unpack.h> #include <unpack.h>
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "glxserver.h" #include "glxserver.h"
#include "glxcontext.h" #include "glxcontext.h"
#include "glximports.h" #include "glximports.h"
......
...@@ -37,12 +37,8 @@ ...@@ -37,12 +37,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#ifdef IN_MODULE
#include <xf86_ansic.h>
#else
#include <string.h> #include <string.h>
#include <signal.h> #include <signal.h>
#endif
#include <windowstr.h> #include <windowstr.h>
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include "glxserver.h" #include "glxserver.h"
#include <GL/glxtokens.h> #include <GL/glxtokens.h>
#include <unpack.h> #include <unpack.h>
......
...@@ -37,6 +37,10 @@ ...@@ -37,6 +37,10 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "glxserver.h" #include "glxserver.h"
#include "glxutil.h" #include "glxutil.h"
#include "glxext.h" #include "glxext.h"
......
...@@ -55,9 +55,6 @@ ...@@ -55,9 +55,6 @@
#ifdef XFree86Server #ifdef XFree86Server
#ifdef XFree86LOADER
#include "xf86_ansic.h"
#endif
#ifndef assert #ifndef assert
#define assert(a) #define assert(a)
#endif #endif
...@@ -111,4 +108,3 @@ ...@@ -111,4 +108,3 @@
#define __glXAtoi(a) atoi(a) #define __glXAtoi(a) atoi(a)
#endif /* _glx_ansic_h_ */ #endif /* _glx_ansic_h_ */
...@@ -36,7 +36,3 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ...@@ -36,7 +36,3 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#endif #endif
#include "miscstruct.h" #include "miscstruct.h"
#ifdef XFree86LOADER
#include "xf86_ansic.h"
#endif
...@@ -35,6 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ...@@ -35,6 +35,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include <gcstruct.h> #include <gcstruct.h>
#include "pixmapstr.h" #include "pixmapstr.h"
#include "xf86glx_util.h" #include "xf86glx_util.h"
......
...@@ -53,11 +53,7 @@ in this Software without prior written authorization from the X Consortium. ...@@ -53,11 +53,7 @@ in this Software without prior written authorization from the X Consortium.
#endif #endif
#ifdef IN_MODULE
#include <xf86_ansic.h>
#else
#include <stdio.h> #include <stdio.h>
#endif
#include "protocol-versions.h" #include "protocol-versions.h"
......
...@@ -28,6 +28,8 @@ in this Software without prior written authorization from The Open Group. ...@@ -28,6 +28,8 @@ in this Software without prior written authorization from The Open Group.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
#include "misc.h" #include "misc.h"
...@@ -43,9 +45,6 @@ in this Software without prior written authorization from The Open Group. ...@@ -43,9 +45,6 @@ in this Software without prior written authorization from The Open Group.
#include "protocol-versions.h" #include "protocol-versions.h"
#include "regionstr.h" #include "regionstr.h"
#include "gcstruct.h" #include "gcstruct.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
typedef RegionPtr (*CreateDftPtr)( typedef RegionPtr (*CreateDftPtr)(
WindowPtr /* pWin */ WindowPtr /* pWin */
......
...@@ -58,9 +58,7 @@ in this Software without prior written authorization from The Open Group. ...@@ -58,9 +58,7 @@ in this Software without prior written authorization from The Open Group.
#define _XSHM_SERVER_ #define _XSHM_SERVER_
#include <X11/extensions/shmstr.h> #include <X11/extensions/shmstr.h>
#include <nx-X11/Xfuncproto.h> #include <nx-X11/Xfuncproto.h>
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
#include "protocol-versions.h" #include "protocol-versions.h"
#ifdef PANORAMIX #ifdef PANORAMIX
......
...@@ -54,6 +54,8 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -54,6 +54,8 @@ PERFORMANCE OF THIS SOFTWARE.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
#include <nx-X11/Xmd.h> #include <nx-X11/Xmd.h>
...@@ -68,14 +70,10 @@ PERFORMANCE OF THIS SOFTWARE. ...@@ -68,14 +70,10 @@ PERFORMANCE OF THIS SOFTWARE.
#include <nx-X11/extensions/syncstr.h> #include <nx-X11/extensions/syncstr.h>
#include "protocol-versions.h" #include "protocol-versions.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
#else
#include <stdio.h> #include <stdio.h>
#if !defined(WIN32) && !defined(Lynx) #if !defined(WIN32) && !defined(Lynx)
#include <sys/time.h> #include <sys/time.h>
#endif #endif
#endif
/* /*
* Local Global Variables * Local Global Variables
......
...@@ -50,9 +50,6 @@ from The Open Group. ...@@ -50,9 +50,6 @@ from The Open Group.
#define EXTENSION_EVENT_BASE 64 #define EXTENSION_EVENT_BASE 64
#include "extinit.h" /* LookupDeviceIntRec */ #include "extinit.h" /* LookupDeviceIntRec */
#endif /* XINPUT */ #endif /* XINPUT */
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
#if 0 #if 0
static unsigned char XTestReqCode; static unsigned char XTestReqCode;
......
...@@ -50,6 +50,8 @@ SOFTWARE. ...@@ -50,6 +50,8 @@ SOFTWARE.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
#include "misc.h" #include "misc.h"
...@@ -69,10 +71,6 @@ SOFTWARE. ...@@ -69,10 +71,6 @@ SOFTWARE.
#include <X11/extensions/shmproto.h> #include <X11/extensions/shmproto.h>
#endif #endif
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
#include "xvdisp.h" #include "xvdisp.h"
#ifdef PANORAMIX #ifdef PANORAMIX
......
...@@ -77,6 +77,8 @@ SOFTWARE. ...@@ -77,6 +77,8 @@ SOFTWARE.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
#include "misc.h" #include "misc.h"
...@@ -97,10 +99,6 @@ SOFTWARE. ...@@ -97,10 +99,6 @@ SOFTWARE.
#include <nx-X11/extensions/Xvproto.h> #include <nx-X11/extensions/Xvproto.h>
#include "xvdix.h" #include "xvdix.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
#ifdef PANORAMIX #ifdef PANORAMIX
#include "panoramiX.h" #include "panoramiX.h"
#include "panoramiXsrv.h" #include "panoramiXsrv.h"
......
...@@ -3,6 +3,8 @@ ...@@ -3,6 +3,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
#include "misc.h" #include "misc.h"
......
...@@ -37,6 +37,8 @@ ...@@ -37,6 +37,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include <nx-X11/Xproto.h> #include <nx-X11/Xproto.h>
#include "scrnintstr.h" #include "scrnintstr.h"
...@@ -47,10 +49,6 @@ ...@@ -47,10 +49,6 @@
#include "dbestruct.h" #include "dbestruct.h"
#include "midbe.h" #include "midbe.h"
#ifdef XFree86LOADER
#include "xf86_ansic.h"
#endif
#if !defined(UINT32_MAX) #if !defined(UINT32_MAX)
#define UINT32_MAX 0xffffffffU #define UINT32_MAX 0xffffffffU
#endif #endif
......
...@@ -54,11 +54,7 @@ ...@@ -54,11 +54,7 @@
#include "gcstruct.h" #include "gcstruct.h"
#include "inputstr.h" #include "inputstr.h"
#ifndef IN_MODULE
#include <stdio.h> #include <stdio.h>
#else
#include "xf86_ansic.h"
#endif
/* DEFINES */ /* DEFINES */
......
...@@ -27,11 +27,7 @@ ...@@ -27,11 +27,7 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#ifdef XFree86LOADER #include <string.h>
#include "xf86.h"
#include "xf86_ansic.h"
#endif
#include "fb.h" #include "fb.h"
/* X apps don't like 24bpp images, this code exposes 32bpp images */ /* X apps don't like 24bpp images, this code exposes 32bpp images */
......
...@@ -28,9 +28,7 @@ ...@@ -28,9 +28,7 @@
#include "fb.h" #include "fb.h"
#include "mizerarc.h" #include "mizerarc.h"
#ifdef IN_MODULE #include <limits.h>
#include "xf86_ansic.h"
#endif
typedef void (*FbArc) (FbBits *dst, typedef void (*FbArc) (FbBits *dst,
FbStride dstStride, FbStride dstStride,
...@@ -99,7 +97,7 @@ fbPolyArc (DrawablePtr pDrawable, ...@@ -99,7 +97,7 @@ fbPolyArc (DrawablePtr pDrawable,
box.x2 = x2; box.x2 = x2;
y2 = box.y1 + (int)parcs->height + 1; y2 = box.y1 + (int)parcs->height + 1;
box.y2 = y2; box.y2 = y2;
if ( (x2 <= MAXSHORT) && (y2 <= MAXSHORT) && if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) &&
(RegionContainsRect(cclip, &box) == rgnIN) ) (RegionContainsRect(cclip, &box) == rgnIN) )
(*arc) (dst, dstStride, dstBpp, (*arc) (dst, dstStride, dstBpp,
parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff, parcs, pDrawable->x + dstXoff, pDrawable->y + dstYoff,
......
...@@ -33,10 +33,14 @@ ...@@ -33,10 +33,14 @@
#ifdef RENDER #ifdef RENDER
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <assert.h>
#include "picturestr.h" #include "picturestr.h"
#include "mipict.h" #include "mipict.h"
#include "fbpict.h" #include "fbpict.h"
#include <math.h>
#define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b)) #define mod(a,b) ((b) == 1 ? 0 : (a) >= 0 ? (a) % (b) : (b) - (-a) % (b))
......
...@@ -26,10 +26,9 @@ ...@@ -26,10 +26,9 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "fb.h" #include "fb.h"
#ifdef IN_MODULE
#include "xf86_ansic.h"
#endif
void void
fbCopyNtoN (DrawablePtr pSrcDrawable, fbCopyNtoN (DrawablePtr pSrcDrawable,
......
...@@ -26,10 +26,9 @@ ...@@ -26,10 +26,9 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "fb.h" #include "fb.h"
#ifdef IN_MODULE
#include "xf86_ansic.h"
#endif
const GCFuncs fbGCFuncs = { const GCFuncs fbGCFuncs = {
fbValidateGC, fbValidateGC,
......
...@@ -26,12 +26,9 @@ ...@@ -26,12 +26,9 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include "fb.h" #include <string.h>
#ifdef XFree86LOADER
#include "xf86.h"
#include "xf86_ansic.h"
#endif
#include "fb.h"
void void
fbPutImage (DrawablePtr pDrawable, fbPutImage (DrawablePtr pDrawable,
......
...@@ -23,11 +23,12 @@ ...@@ -23,11 +23,12 @@
* Author: Keith Packard, SuSE, Inc. * Author: Keith Packard, SuSE, Inc.
*/ */
#ifdef HAVE_DIX_CONFIG_H #ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "fb.h" #include "fb.h"
#include "fboverlay.h" #include "fboverlay.h"
......
...@@ -27,6 +27,8 @@ ...@@ -27,6 +27,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include "fb.h" #include "fb.h"
#ifdef RENDER #ifdef RENDER
......
...@@ -26,10 +26,9 @@ ...@@ -26,10 +26,9 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "fb.h" #include "fb.h"
#ifdef IN_MODULE
#include "xf86_ansic.h"
#endif
PixmapPtr PixmapPtr
fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp) fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp)
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "fb.h" #include "fb.h"
#include "miline.h" #include "miline.h"
......
...@@ -26,10 +26,9 @@ ...@@ -26,10 +26,9 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "fb.h" #include "fb.h"
#ifdef IN_MODULE
#include "xf86_ansic.h"
#endif
Bool Bool
fbCreateWindow(WindowPtr pWin) fbCreateWindow(WindowPtr pWin)
......
...@@ -233,7 +233,7 @@ NX_DEFINES = \ ...@@ -233,7 +233,7 @@ NX_DEFINES = \
DEFINES = \ DEFINES = \
-g $(OS_DEFINES) $(EXT_DEFINES) $(NX_DEFINES) \ -g $(OS_DEFINES) $(EXT_DEFINES) $(NX_DEFINES) \
-UXF86VIDMODE -UXFreeXDGA -UXF86MISC -UXF86DRI -UXFree86LOADER \ -UXF86VIDMODE -UXFreeXDGA -UXF86MISC -UXF86DRI \
-DNXAGENT_SERVER \ -DNXAGENT_SERVER \
-DNXAGENT_CONSTRAINCURSOR \ -DNXAGENT_CONSTRAINCURSOR \
-DNXAGENT_FONTCACHE_SIZE=50 \ -DNXAGENT_FONTCACHE_SIZE=50 \
......
...@@ -96,11 +96,9 @@ extern unsigned long serverGeneration; ...@@ -96,11 +96,9 @@ extern unsigned long serverGeneration;
#include <nx-X11/Xdefs.h> #include <nx-X11/Xdefs.h>
#ifndef IN_MODULE
#ifndef NULL #ifndef NULL
#include <stddef.h> #include <stddef.h>
#endif #endif
#endif
#ifndef MAXSCREENS #ifndef MAXSCREENS
#define MAXSCREENS 16 #define MAXSCREENS 16
...@@ -128,9 +126,7 @@ typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */ ...@@ -128,9 +126,7 @@ typedef struct _CallbackList *CallbackListPtr; /* also in dix.h */
typedef struct _xReq *xReqPtr; typedef struct _xReq *xReqPtr;
#include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */ #include "os.h" /* for ALLOCATE_LOCAL and DEALLOCATE_LOCAL */
#ifndef IN_MODULE
#include <nx-X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */ #include <nx-X11/Xfuncs.h> /* for bcopy, bzero, and bcmp */
#endif
#define NullBox ((BoxPtr)0) #define NullBox ((BoxPtr)0)
#define MILLI_PER_MIN (1000 * 60) #define MILLI_PER_MIN (1000 * 60)
...@@ -158,12 +154,10 @@ typedef struct _xReq *xReqPtr; ...@@ -158,12 +154,10 @@ typedef struct _xReq *xReqPtr;
#define min(a, b) (((a) < (b)) ? (a) : (b)) #define min(a, b) (((a) < (b)) ? (a) : (b))
#define max(a, b) (((a) > (b)) ? (a) : (b)) #define max(a, b) (((a) > (b)) ? (a) : (b))
#ifndef IN_MODULE
/* abs() is a function, not a macro; include the file declaring /* abs() is a function, not a macro; include the file declaring
* it in case we haven't done that yet. * it in case we haven't done that yet.
*/ */
#include <stdlib.h> #include <stdlib.h>
#endif /* IN_MODULE */
#ifndef Fabs #ifndef Fabs
#define Fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */ #define Fabs(a) ((a) > 0.0 ? (a) : -(a)) /* floating absolute value */
#endif #endif
...@@ -179,7 +173,6 @@ typedef struct _xReq *xReqPtr; ...@@ -179,7 +173,6 @@ typedef struct _xReq *xReqPtr;
*/ */
#define lowbit(x) ((x) & (~(x) + 1)) #define lowbit(x) ((x) & (~(x) + 1))
#ifndef IN_MODULE
/* XXX Not for modules */ /* XXX Not for modules */
#include <limits.h> #include <limits.h>
#if !defined(MAXSHORT) || !defined(MINSHORT) || \ #if !defined(MAXSHORT) || !defined(MINSHORT) || \
...@@ -204,8 +197,6 @@ typedef struct _xReq *xReqPtr; ...@@ -204,8 +197,6 @@ typedef struct _xReq *xReqPtr;
#include <ctype.h> #include <ctype.h>
#include <stdio.h> /* for fopen, etc... */ #include <stdio.h> /* for fopen, etc... */
#endif
/** /**
* Calculate the number of bytes needed to hold bits. * Calculate the number of bytes needed to hold bits.
* @param bits The minimum number of bits needed. * @param bits The minimum number of bits needed.
......
...@@ -53,11 +53,7 @@ SOFTWARE. ...@@ -53,11 +53,7 @@ SOFTWARE.
#define ALLOCATE_LOCAL_FALLBACK(_size) malloc((unsigned long)(_size)) #define ALLOCATE_LOCAL_FALLBACK(_size) malloc((unsigned long)(_size))
#define DEALLOCATE_LOCAL_FALLBACK(_ptr) free((void *)(_ptr)) #define DEALLOCATE_LOCAL_FALLBACK(_ptr) free((void *)(_ptr))
#include <nx-X11/Xalloca.h> #include <nx-X11/Xalloca.h>
#ifndef IN_MODULE
#include <stdarg.h> #include <stdarg.h>
#else
#include "xf86_ansic.h"
#endif
#define NullFID ((FID) 0) #define NullFID ((FID) 0)
...@@ -86,12 +82,10 @@ typedef struct _NewClientRec *NewClientPtr; ...@@ -86,12 +82,10 @@ typedef struct _NewClientRec *NewClientPtr;
#define xnfstrdup(s) XNFstrdup(s) #define xnfstrdup(s) XNFstrdup(s)
#endif #endif
#ifndef IN_MODULE
#ifdef __SCO__ #ifdef __SCO__
#include <stdio.h> #include <stdio.h>
#endif #endif
#include <string.h> #include <string.h>
#endif
/* have to put $(SIGNAL_DEFINES) in DEFINES in Imakefile to get this right */ /* have to put $(SIGNAL_DEFINES) in DEFINES in Imakefile to get this right */
#ifdef SIGNALRETURNSINT #ifdef SIGNALRETURNSINT
...@@ -519,7 +513,7 @@ extern void ErrorF(const char *f, ...) _printf_attribute(1,2); ...@@ -519,7 +513,7 @@ extern void ErrorF(const char *f, ...) _printf_attribute(1,2);
extern void Error(char *str); extern void Error(char *str);
extern void LogPrintMarkers(void); extern void LogPrintMarkers(void);
#if defined(NEED_SNPRINTF) && !defined(IN_MODULE) #if defined(NEED_SNPRINTF)
extern int snprintf(char *str, size_t size, const char *format, ...) extern int snprintf(char *str, size_t size, const char *format, ...)
_printf_attribute(3,4); _printf_attribute(3,4);
extern int vsnprintf(char *str, size_t size, const char *format, va_list ap); extern int vsnprintf(char *str, size_t size, const char *format, va_list ap);
......
...@@ -141,14 +141,12 @@ OBJS = $(CBRT_OBJ) \ ...@@ -141,14 +141,12 @@ OBJS = $(CBRT_OBJ) \
* in order to build the XInputExtension, since we * in order to build the XInputExtension, since we
* don't use the XF86 module loader. * don't use the XF86 module loader.
*/ */
EXT_DEFINES = ExtensionDefines \ EXT_DEFINES = ExtensionDefines \
-UXFree86LOADER $(NULL)
#else #else
EXT_DEFINES = ExtensionDefines \
EXT_DEFINES = ExtensionDefines -UXINPUT \ -UXINPUT \
-UXFree86LOADER $(NULL)
#endif #endif
#endif #endif
......
...@@ -146,12 +146,8 @@ extern Bool noXIdleExtension; ...@@ -146,12 +146,8 @@ extern Bool noXIdleExtension;
extern Bool noXvExtension; extern Bool noXvExtension;
#endif #endif
#ifndef XFree86LOADER
#define INITARGS void #define INITARGS void
typedef void (*InitExtension)(void); typedef void (*InitExtension)(void);
#else /* XFree86Loader */
#include "loaderProcs.h"
#endif
#ifdef MITSHM #ifdef MITSHM
#define _XSHM_SERVER_ #define _XSHM_SERVER_
...@@ -380,8 +376,6 @@ void EnableDisableExtensionError(char *name, Bool enable) ...@@ -380,8 +376,6 @@ void EnableDisableExtensionError(char *name, Bool enable)
ErrorF(" %s\n", ext->name); ErrorF(" %s\n", ext->name);
} }
#ifndef XFree86LOADER
/*ARGSUSED*/ /*ARGSUSED*/
void void
InitExtensions(argc, argv) InitExtensions(argc, argv)
...@@ -496,101 +490,3 @@ InitVisualWrap() ...@@ -496,101 +490,3 @@ InitVisualWrap()
#endif #endif
} }
#else /* XFree86LOADER */
/* List of built-in (statically linked) extensions */
static ExtensionModule staticExtensions[] = {
#ifdef XTESTEXT1
{ XTestExtension1Init, "XTEST1", &noTestExtensions, NULL, NULL },
#endif
#ifdef MITSHM
{ ShmExtensionInit, SHMNAME, &noMITShmExtension, NULL, NULL },
#endif
#ifdef XINPUT
{ XInputExtensionInit, "XInputExtension", &noXInputExtension, NULL, NULL },
#endif
#ifdef XTEST
{ XTestExtensionInit, XTestExtensionName, &noTestExtensions, NULL, NULL },
#endif
#ifdef XIDLE
{ XIdleExtensionInit, "XIDLE", &noXIdleExtension, NULL, NULL },
#endif
#ifdef XKB
{ XkbExtensionInit, XkbName, &noXkbExtension, NULL, NULL },
#endif
#ifdef XCSECURITY
{ SecurityExtensionInit, SECURITY_EXTENSION_NAME, &noSecurityExtension, NULL, NULL },
#endif
#ifdef PANORAMIX
{ PanoramiXExtensionInit, PANORAMIX_PROTOCOL_NAME, &noPanoramiXExtension, NULL, NULL },
#endif
#ifdef XFIXES
/* must be before Render to layer DisplayCursor correctly */
{ XFixesExtensionInit, "XFIXES", &noXFixesExtension, NULL, NULL },
#endif
#ifdef XF86BIGFONT
{ XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension, NULL, NULL },
#endif
#ifdef RENDER
{ RenderExtensionInit, "RENDER", &noRenderExtension, NULL, NULL },
#endif
#ifdef RANDR
{ RRExtensionInit, "RANDR", &noRRExtension, NULL, NULL },
#endif
#ifdef COMPOSITE
{ CompositeExtensionInit, "COMPOSITE", &noCompositeExtension, NULL },
#endif
#ifdef DAMAGE
{ DamageExtensionInit, "DAMAGE", &noDamageExtension, NULL },
#endif
{ NULL, NULL, NULL, NULL, NULL }
};
/*ARGSUSED*/
void
InitExtensions(argc, argv)
int argc;
char *argv[];
{
int i;
ExtensionModule *ext;
static Bool listInitialised = FALSE;
if (!listInitialised) {
/* Add built-in extensions to the list. */
for (i = 0; staticExtensions[i].name; i++)
LoadExtension(&staticExtensions[i], TRUE);
/* Sort the extensions according the init dependencies. */
LoaderSortExtensions();
listInitialised = TRUE;
}
for (i = 0; ExtensionModuleList[i].name != NULL; i++) {
ext = &ExtensionModuleList[i];
if (ext->initFunc != NULL &&
(ext->disablePtr == NULL ||
(ext->disablePtr != NULL && !*ext->disablePtr))) {
(ext->initFunc)();
}
}
}
static void (*__miHookInitVisualsFunction)(miInitVisualsProcPtr *);
void
InitVisualWrap()
{
miResetInitVisuals();
if (__miHookInitVisualsFunction)
(*__miHookInitVisualsFunction)(&miInitVisualsProc);
}
void miHookInitVisuals(void (**old)(miInitVisualsProcPtr *),
void (*new)(miInitVisualsProcPtr *))
{
if (old)
*old = __miHookInitVisualsFunction;
__miHookInitVisualsFunction = new;
}
#endif /* XFree86LOADER */
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include "gcstruct.h" #include "gcstruct.h"
#include "windowstr.h" #include "windowstr.h"
#include "cw.h" #include "cw.h"
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include "gcstruct.h" #include "gcstruct.h"
#include "cw.h" #include "cw.h"
......
...@@ -25,6 +25,8 @@ ...@@ -25,6 +25,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#include "gcstruct.h" #include "gcstruct.h"
#include "windowstr.h" #include "windowstr.h"
#include "cw.h" #include "cw.h"
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <stdlib.h>
#include <nx-X11/X.h> #include <nx-X11/X.h>
#include "scrnintstr.h" #include "scrnintstr.h"
#include "windowstr.h" #include "windowstr.h"
......
...@@ -92,10 +92,6 @@ int limitNoFile = -1; ...@@ -92,10 +92,6 @@ int limitNoFile = -1;
Bool OsDelayInitColors = FALSE; Bool OsDelayInitColors = FALSE;
#ifdef XFree86LOADER
extern void xf86WrapperInit(void);
#endif
void void
OsInit(void) OsInit(void)
{ {
...@@ -109,9 +105,6 @@ OsInit(void) ...@@ -109,9 +105,6 @@ OsInit(void)
#endif #endif
if (!been_here) { if (!been_here) {
#ifdef XFree86LOADER
xf86WrapperInit();
#endif
#if !defined(__SCO__) && !defined(__CYGWIN__) && !defined(__UNIXWARE__) #if !defined(__SCO__) && !defined(__CYGWIN__) && !defined(__UNIXWARE__)
fclose(stdin); fclose(stdin);
fclose(stdout); fclose(stdout);
......
...@@ -42,12 +42,8 @@ and Jim Haggerty of Metheus. ...@@ -42,12 +42,8 @@ and Jim Haggerty of Metheus.
#include <nx-X11/extensions/recordstr.h> #include <nx-X11/extensions/recordstr.h>
#include "set.h" #include "set.h"
#ifndef XFree86LOADER
#include <stdio.h> #include <stdio.h>
#include <assert.h> #include <assert.h>
#else
#include "xf86_ansic.h"
#endif
#ifdef PANORAMIX #ifdef PANORAMIX
#include "globals.h" #include "globals.h"
......
...@@ -53,12 +53,13 @@ from The Open Group. ...@@ -53,12 +53,13 @@ from The Open Group.
#include <dix-config.h> #include <dix-config.h>
#endif #endif
#include <string.h>
#ifndef TESTING #ifndef TESTING
#include "misc.h" #include "misc.h"
#else #else
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <string.h>
/* stuff that you normally get from the X Server's environment */ /* stuff that you normally get from the X Server's environment */
...@@ -81,11 +82,6 @@ typedef unsigned short CARD16; ...@@ -81,11 +82,6 @@ typedef unsigned short CARD16;
#include "set.h" #include "set.h"
#ifdef XFree86LOADER
#include "xf86_libc.h"
#include "xf86_ansic.h"
#endif
static int static int
maxMemberInInterval(pIntervals, nIntervals) maxMemberInInterval(pIntervals, nIntervals)
RecordSetInterval *pIntervals; RecordSetInterval *pIntervals;
......
...@@ -45,9 +45,6 @@ ...@@ -45,9 +45,6 @@
#include "glyphstr.h" #include "glyphstr.h"
#include <nx-X11/Xfuncproto.h> #include <nx-X11/Xfuncproto.h>
#include "cursorstr.h" #include "cursorstr.h"
#ifdef EXTMODULE
#include "xf86_ansic.h"
#endif
#include "protocol-versions.h" #include "protocol-versions.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment