aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/extras
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/extras')
-rw-r--r--nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c26
-rw-r--r--nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c8
-rw-r--r--nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h10
3 files changed, 15 insertions, 29 deletions
diff --git a/nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c b/nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
index bb1c82794..7d4d06ab8 100644
--- a/nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
+++ b/nx-X11/extras/Mesa/src/mesa/drivers/dri/common/glcontextmodes.c
@@ -31,31 +31,17 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
-#if defined(IN_MINI_GLX)
# include <stdlib.h>
# include <string.h>
+
+#if defined(IN_MINI_GLX)
# include <GL/gl.h>
# include "GL/internal/dri_interface.h"
# include "imports.h"
-# define __glXMemset memset
#else
# include <nx-X11/X.h>
# include <GL/glx.h>
# include "GL/glxint.h"
-
-# ifdef XFree86Server
-void *memset( void * ptr, int val, size_t size);
-# include "GL/glx_ansic.h"
-extern void * __glXMalloc( size_t size );
-extern void __glXFree( void * ptr );
-# define _mesa_malloc(b) __glXMalloc(b)
-# define _mesa_free(m) __glXFree(m)
-# else
-# include <nx-X11/Xlibint.h>
-# define __glXMemset memset
-# define _mesa_malloc(b) Xmalloc(b)
-# define _mesa_free(m) Xfree(m)
-# endif /* XFree86Server */
#endif /* !defined(IN_MINI_GLX) */
#include "glcontextmodes.h"
@@ -127,7 +113,7 @@ _gl_copy_visual_to_context_mode( __GLcontextModes * mode,
{
__GLcontextModes * const next = mode->next;
- (void) __glXMemset( mode, 0, sizeof( __GLcontextModes ) );
+ (void) memset( mode, 0, sizeof( __GLcontextModes ) );
mode->next = next;
mode->visualID = config->vid;
@@ -361,14 +347,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) __glXMemset( *next, 0, size );
+ (void) memset( *next, 0, size );
(*next)->visualID = GLX_DONT_CARE;
(*next)->visualType = GLX_DONT_CARE;
(*next)->visualRating = GLX_NONE;
@@ -402,7 +388,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/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c b/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c
index d47f3eaca..6c5cf3daf 100644
--- a/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c
+++ b/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_execute.c
@@ -195,10 +195,10 @@ int _slang_execute (const slang_assembly_file *file)
/* XXX why???, disabling the pointer size assertions here.
* See bug 4021.
*/
- static_assert(sizeof (GLfloat) == 4);
- /*static_assert(sizeof (GLfloat *) == 4);*/
- static_assert(sizeof (GLuint) == 4);
- /*static_assert(sizeof (GLuint *) == 4);*/
+ _static_assert(sizeof (GLfloat) == 4);
+ /*_static_assert(sizeof (GLfloat *) == 4);*/
+ _static_assert(sizeof (GLuint) == 4);
+ /*_static_assert(sizeof (GLuint *) == 4);*/
dump (file);
diff --git a/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h b/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h
index 2b040a444..6f2f5d345 100644
--- a/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h
+++ b/nx-X11/extras/Mesa/src/mesa/shader/slang/slang_utility.h
@@ -29,11 +29,11 @@
extern "C" {
#endif
-/* Compile-time assertions. If the expression is zero, try to declare an
- * array of size [-1] to cause compilation error.
- */
-#define static_assert(expr) do { int _array[(expr) ? 1 : -1]; _array[0]; } while (0)
-
+/* Compile-time assertions. If the expression is zero, try to declare an
+ * array of size [-1] to cause compilation error.
+ */
+#define _static_assert(expr) do { int _array[(expr) ? 1 : -1]; _array[0]; } while (0)
+
void slang_alloc_free (void *);
void *slang_alloc_malloc (unsigned int);
void *slang_alloc_realloc (void *, unsigned int, unsigned int);