summaryrefslogtreecommitdiff
path: root/src/glx
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@bitplanet.net>2010-02-19 11:58:49 -0500
committerKristian Høgsberg <krh@bitplanet.net>2010-02-19 12:03:01 -0500
commit32f2fd1c5d6088692551c80352b7d6fa35b0cd09 (patch)
tree5c44742f6d4f8711b6d1ca31d68d3245abd0187a /src/glx
parent6bf1ea897fa470af58fe8916dff45e2da79634a3 (diff)
Replace _mesa_malloc, _mesa_calloc and _mesa_free with plain libc versions
Diffstat (limited to 'src/glx')
-rw-r--r--src/glx/glcontextmodes.c35
-rw-r--r--src/glx/glcontextmodes.h2
2 files changed, 4 insertions, 33 deletions
diff --git a/src/glx/glcontextmodes.c b/src/glx/glcontextmodes.c
index 257087a802..eb9037907f 100644
--- a/src/glx/glcontextmodes.c
+++ b/src/glx/glcontextmodes.c
@@ -31,39 +31,13 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
-#if defined(IN_MINI_GLX)
-#include <GL/gl.h>
-#else
-#if defined(HAVE_DIX_CONFIG_H)
-# include <dix-config.h>
-#endif
-#include <X11/X.h>
#include <GL/glx.h>
#include "GL/glxint.h"
-#endif
-
-/* Memory macros */
-#if defined(IN_MINI_GLX)
-# include <stdlib.h>
-# include <string.h>
-# define _mesa_malloc(b) malloc(b)
-# define _mesa_free(m) free(m)
-#else
-# ifdef XFree86Server
-# include <os.h>
-# include <string.h>
-# define _mesa_malloc(b) xalloc(b)
-# define _mesa_free(m) xfree(m)
-# else
-# include <X11/Xlibint.h>
-# define _mesa_malloc(b) Xmalloc(b)
-# define _mesa_free(m) Xfree(m)
-# endif /* XFree86Server */
-#endif /* !defined(IN_MINI_GLX) */
+#include <stdlib.h>
+#include <string.h>
#include "glcontextmodes.h"
-#if !defined(IN_MINI_GLX)
#define NUM_VISUAL_TYPES 6
/**
@@ -352,7 +326,6 @@ _gl_get_context_mode_data(const __GLcontextModes * mode, int attribute,
return GLX_BAD_ATTRIBUTE;
}
}
-#endif /* !defined(IN_MINI_GLX) */
/**
@@ -392,7 +365,7 @@ _gl_context_modes_create(unsigned count, size_t minimum_size)
next = &base;
for (i = 0; i < count; i++) {
- *next = (__GLcontextModes *) _mesa_malloc(size);
+ *next = (__GLcontextModes *) malloc(size);
if (*next == NULL) {
_gl_context_modes_destroy(base);
base = NULL;
@@ -438,7 +411,7 @@ _gl_context_modes_destroy(__GLcontextModes * modes)
while (modes != NULL) {
__GLcontextModes *const next = modes->next;
- _mesa_free(modes);
+ free(modes);
modes = next;
}
}
diff --git a/src/glx/glcontextmodes.h b/src/glx/glcontextmodes.h
index 6676ae306c..ecf0280cba 100644
--- a/src/glx/glcontextmodes.h
+++ b/src/glx/glcontextmodes.h
@@ -32,14 +32,12 @@
#include "GL/internal/glcore.h"
-#if !defined(IN_MINI_GLX)
extern GLint _gl_convert_from_x_visual_type(int visualType);
extern GLint _gl_convert_to_x_visual_type(int visualType);
extern void _gl_copy_visual_to_context_mode(__GLcontextModes * mode,
const __GLXvisualConfig * config);
extern int _gl_get_context_mode_data(const __GLcontextModes * mode,
int attribute, int *value_return);
-#endif /* !defined(IN_MINI_GLX) */
extern __GLcontextModes *_gl_context_modes_create(unsigned count,
size_t minimum_size);