glx: Don't hard-code the name "libGL.so.1" in driOpenDriver (v3)
[mesa.git] / src / glx / glxcmds.c
index 04d8db16096768eaa086f2d68fc53958efafaa33..93e8db5a367da96263812bea312617324f349828 100644 (file)
@@ -496,7 +496,7 @@ glXQueryVersion(Display * dpy, int *major, int *minor)
 }
 
 /*
-** Query the existance of the GLX extension
+** Query the existence of the GLX extension
 */
 _X_EXPORT Bool
 glXQueryExtension(Display * dpy, int *errorBase, int *eventBase)
@@ -2428,23 +2428,6 @@ __glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer)
 
 #endif /* GLX_USE_APPLEGL */
 
-/**
- * \c strdup is actually not a standard ANSI C or POSIX routine.
- * Irix will not define it if ANSI mode is in effect.
- *
- * \sa strdup
- */
-_X_HIDDEN char *
-__glXstrdup(const char *str)
-{
-   char *copy;
-   copy = malloc(strlen(str) + 1);
-   if (!copy)
-      return NULL;
-   strcpy(copy, str);
-   return copy;
-}
-
 /*
 ** glXGetProcAddress support
 */
@@ -2663,7 +2646,11 @@ _X_EXPORT void (*glXGetProcAddressARB(const GLubyte * procName)) (void)
  */
 _X_EXPORT void (*glXGetProcAddress(const GLubyte * procName)) (void)
 #if defined(__GNUC__) && !defined(GLX_ALIAS_UNSUPPORTED)
+# if defined(USE_MGL_NAMESPACE)
+   __attribute__ ((alias("mglXGetProcAddressARB")));
+# else
    __attribute__ ((alias("glXGetProcAddressARB")));
+# endif
 #else
 {
    return glXGetProcAddressARB(procName);