summaryrefslogtreecommitdiffstats
path: root/src/glx/glcontextmodes.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/glx/glcontextmodes.c')
-rw-r--r--src/glx/glcontextmodes.c42
1 files changed, 6 insertions, 36 deletions
diff --git a/src/glx/glcontextmodes.c b/src/glx/glcontextmodes.c
index 232031c2ca8..eb9037907fc 100644
--- a/src/glx/glcontextmodes.c
+++ b/src/glx/glcontextmodes.c
@@ -31,42 +31,13 @@
* \author Ian Romanick <[email protected]>
*/
-#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)
-# define _mesa_memset memset
-#else
-# ifdef XFree86Server
-# include <os.h>
-# include <string.h>
-# define _mesa_malloc(b) xalloc(b)
-# define _mesa_free(m) xfree(m)
-# define _mesa_memset memset
-# else
-# include <X11/Xlibint.h>
-# define _mesa_memset memset
-# 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
/**
@@ -133,7 +104,7 @@ _gl_copy_visual_to_context_mode(__GLcontextModes * mode,
{
__GLcontextModes *const next = mode->next;
- (void) _mesa_memset(mode, 0, sizeof(__GLcontextModes));
+ (void) memset(mode, 0, sizeof(__GLcontextModes));
mode->next = next;
mode->visualID = config->vid;
@@ -355,7 +326,6 @@ _gl_get_context_mode_data(const __GLcontextModes * mode, int attribute,
return GLX_BAD_ATTRIBUTE;
}
}
-#endif /* !defined(IN_MINI_GLX) */
/**
@@ -395,14 +365,14 @@ _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;
break;
}
- (void) _mesa_memset(*next, 0, size);
+ (void) memset(*next, 0, size);
(*next)->visualID = GLX_DONT_CARE;
(*next)->visualType = GLX_DONT_CARE;
(*next)->visualRating = GLX_NONE;
@@ -441,7 +411,7 @@ _gl_context_modes_destroy(__GLcontextModes * modes)
while (modes != NULL) {
__GLcontextModes *const next = modes->next;
- _mesa_free(modes);
+ free(modes);
modes = next;
}
}