From 5980fc35c9e2e25a5a53cb1b38245ad763885cca Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Sun, 21 Sep 2014 22:53:04 -0700 Subject: mesa: Drop _mesa_getenv() wrapper. Reviewed-by: Ian Romanick Reviewed-by: Jose Fonseca Reviewed-by: Emil Velikov --- src/mesa/drivers/x11/fakeglx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/mesa/drivers/x11/fakeglx.c') diff --git a/src/mesa/drivers/x11/fakeglx.c b/src/mesa/drivers/x11/fakeglx.c index a47ad741420..ee05f8aaa3d 100644 --- a/src/mesa/drivers/x11/fakeglx.c +++ b/src/mesa/drivers/x11/fakeglx.c @@ -258,7 +258,7 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, if (dbFlag) { /* Check if the MESA_BACK_BUFFER env var is set */ - char *backbuffer = _mesa_getenv("MESA_BACK_BUFFER"); + char *backbuffer = getenv("MESA_BACK_BUFFER"); if (backbuffer) { if (backbuffer[0]=='p' || backbuffer[0]=='P') { ximageFlag = GL_FALSE; @@ -279,13 +279,13 @@ save_glx_visual( Display *dpy, XVisualInfo *vinfo, /* Comparing IDs uses less memory but sometimes fails. */ /* XXX revisit this after 3.0 is finished. */ - if (_mesa_getenv("MESA_GLX_VISUAL_HACK")) + if (getenv("MESA_GLX_VISUAL_HACK")) comparePointers = GL_TRUE; else comparePointers = GL_FALSE; /* Force the visual to have an alpha channel */ - if (_mesa_getenv("MESA_GLX_FORCE_ALPHA")) + if (getenv("MESA_GLX_FORCE_ALPHA")) alphaFlag = GL_TRUE; /* First check if a matching visual is already in the list */ @@ -350,7 +350,7 @@ static GLint default_depth_bits(void) { int zBits; - const char *zEnv = _mesa_getenv("MESA_GLX_DEPTH_BITS"); + const char *zEnv = getenv("MESA_GLX_DEPTH_BITS"); if (zEnv) zBits = atoi(zEnv); else @@ -362,7 +362,7 @@ static GLint default_alpha_bits(void) { int aBits; - const char *aEnv = _mesa_getenv("MESA_GLX_ALPHA_BITS"); + const char *aEnv = getenv("MESA_GLX_ALPHA_BITS"); if (aEnv) aBits = atoi(aEnv); else @@ -559,11 +559,11 @@ get_env_visual(Display *dpy, int scr, const char *varname) int depth, xclass = -1; XVisualInfo *vis; - if (!_mesa_getenv( varname )) { + if (!getenv( varname )) { return NULL; } - strncpy( value, _mesa_getenv(varname), 100 ); + strncpy( value, getenv(varname), 100 ); value[99] = 0; sscanf( value, "%s %d", type, &depth ); @@ -1428,7 +1428,7 @@ Fake_glXDestroyGLXPixmap( Display *dpy, GLXPixmap pixmap ) if (b) { XMesaDestroyBuffer(b); } - else if (_mesa_getenv("MESA_DEBUG")) { + else if (getenv("MESA_DEBUG")) { _mesa_warning(NULL, "Mesa: glXDestroyGLXPixmap: invalid pixmap\n"); } } @@ -1504,7 +1504,7 @@ Fake_glXSwapBuffers( Display *dpy, GLXDrawable drawable ) if (buffer) { XMesaSwapBuffers(buffer); } - else if (_mesa_getenv("MESA_DEBUG")) { + else if (getenv("MESA_DEBUG")) { _mesa_warning(NULL, "glXSwapBuffers: invalid drawable 0x%x\n", (int) drawable); } @@ -1522,7 +1522,7 @@ Fake_glXCopySubBufferMESA( Display *dpy, GLXDrawable drawable, if (buffer) { XMesaCopySubBuffer(buffer, x, y, width, height); } - else if (_mesa_getenv("MESA_DEBUG")) { + else if (getenv("MESA_DEBUG")) { _mesa_warning(NULL, "Mesa: glXCopySubBufferMESA: invalid drawable\n"); } } -- cgit v1.2.3