summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/common/glcontextmodes.c
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2004-06-07 21:23:12 +0000
committerIan Romanick <[email protected]>2004-06-07 21:23:12 +0000
commit7c46033130b1b4d6098647d85c2710367572e079 (patch)
tree58c26bbae41bde3ef44de672d2c73b7b3e55930e /src/mesa/drivers/dri/common/glcontextmodes.c
parent03d7596b84bbe1e913206ebca91b9d05ed57e0ab (diff)
Fix up some remaining include issues. Replace Xmalloc / Xfree with
_mesa_malloc / _mesa_free. Replace Bool with GLboolean.
Diffstat (limited to 'src/mesa/drivers/dri/common/glcontextmodes.c')
-rw-r--r--src/mesa/drivers/dri/common/glcontextmodes.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/common/glcontextmodes.c b/src/mesa/drivers/dri/common/glcontextmodes.c
index 420c597e59c..c540e5baecd 100644
--- a/src/mesa/drivers/dri/common/glcontextmodes.c
+++ b/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -33,8 +33,11 @@
#ifdef DRI_NEW_INTERFACE_ONLY
# include <stdlib.h>
+# include <string.h>
# include <GL/gl.h>
# include "dri_interface.h"
+# include "imports.h"
+# define __glXMemset memset
#else
# include <X11/X.h>
# include <GL/glx.h>
@@ -44,11 +47,13 @@
# include "GL/glx_ansic.h"
extern void * __glXMalloc( size_t size );
extern void __glXFree( void * ptr );
-# define Xmalloc __glXMalloc
-# define Xfree __glXFree
+# define _mesa_malloc(b) __glXMalloc(b)
+# define _mesa_free(m) __glXFree(m)
# else
# include <X11/Xlibint.h>
# define __glXMemset memset
+# define _mesa_malloc(b) Xmalloc(b)
+# define _mesa_free(m) Xfree(m)
# endif /* XFree86Server */
#endif /* DRI_NEW_INTERFACE_ONLY */
@@ -355,7 +360,7 @@ _gl_context_modes_create( unsigned count, size_t minimum_size )
next = & base;
for ( i = 0 ; i < count ; i++ ) {
- *next = (__GLcontextModes *) Xmalloc( size );
+ *next = (__GLcontextModes *) _mesa_malloc( size );
if ( *next == NULL ) {
_gl_context_modes_destroy( base );
base = NULL;
@@ -396,7 +401,7 @@ _gl_context_modes_destroy( __GLcontextModes * modes )
while ( modes != NULL ) {
__GLcontextModes * const next = modes->next;
- Xfree( modes );
+ _mesa_free( modes );
modes = next;
}
}