From cee997dacb28aa9378b834b66a33c441145dceb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristian=20H=C3=B8gsberg?= Date: Mon, 31 Oct 2016 15:06:37 +0100 Subject: Drop glx_ansic.h wrapper and call malloc, realloc, free and str-funcs directly. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 2d2d38d17cc2558f8a41166a4a1578bc4c663c37 Author: Kristian Høgsberg Date: Fri Mar 17 01:47:25 2006 +0000 Check for glproto when building GLX and make sure we have at least 1.4.6. Drop glx_ansic.h wrapper and call xalloc, xrealloc, xfree and str-funcs directly. We don't check the glproto version as we know what it is (we have our own proto file). Furthermore, we skip the switch from --glX -> x and directly switch to (e.g. __glXMalloc() -> malloc()). Backported-to-NX-by: Mike Gabriel --- nx-X11/programs/Xserver/GL/glx/glximports.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'nx-X11/programs/Xserver/GL/glx/glximports.c') diff --git a/nx-X11/programs/Xserver/GL/glx/glximports.c b/nx-X11/programs/Xserver/GL/glx/glximports.c index a5a5e37ae..fb4d508a9 100644 --- a/nx-X11/programs/Xserver/GL/glx/glximports.c +++ b/nx-X11/programs/Xserver/GL/glx/glximports.c @@ -44,7 +44,6 @@ #include "glxserver.h" #include "glxcontext.h" #include "glximports.h" -#include "GL/glx_ansic.h" void *__glXImpMalloc(__GLcontext *gc, size_t size) { @@ -76,7 +75,7 @@ void *__glXImpCalloc(__GLcontext *gc, size_t numElements, size_t elementSize) return NULL; } /* zero out memory */ - __glXMemset(addr, 0, size); + memset(addr, 0, size); return addr; } @@ -119,17 +118,17 @@ void __glXImpWarning(__GLcontext *gc, char *msg) void __glXImpFatal(__GLcontext *gc, char *msg) { ErrorF("%s",(char *)msg); - __glXAbort(); + abort(); } char *__glXImpGetenv(__GLcontext *gc, const char *var) { - return __glXGetenv(var); + return getenv(var); } int __glXImpAtoi(__GLcontext *gc, const char *str) { - return __glXAtoi(str); + return atoi(str); } int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...) @@ -139,7 +138,7 @@ int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...) /* have to deal with var args */ va_start(ap, fmt); - ret = __glXVsprintf(str, fmt, ap); + ret = vsprintf(str, fmt, ap); va_end(ap); return ret; @@ -147,12 +146,12 @@ int __glXImpSprintf(__GLcontext *gc, char *str, const char *fmt, ...) void *__glXImpFopen(__GLcontext *gc, const char *path, const char *mode) { - return (void *) __glXFopen(path, mode); + return (void *) fopen(path, mode); } int __glXImpFclose(__GLcontext *gc, void *stream) { - return __glXFclose((FILE *)stream); + return fclose((FILE *)stream); } int __glXImpFprintf(__GLcontext *gc, void *stream, const char *fmt, ...) @@ -162,7 +161,7 @@ int __glXImpFprintf(__GLcontext *gc, void *stream, const char *fmt, ...) /* have to deal with var args */ va_start(ap, fmt); - ret = __glXVfprintf((FILE *)stream, fmt, ap); + ret = vfprintf((FILE *)stream, fmt, ap); va_end(ap); return ret; -- cgit v1.2.3