$NetBSD: patch-ac,v 1.2 1999/10/25 10:18:37 tron Exp $

--- servGL/serverglx/glxmesa.c.orig	Mon Aug  2 20:37:13 1999
+++ servGL/serverglx/glxmesa.c	Sun Oct 24 22:30:45 1999
@@ -54,6 +54,7 @@
 #include "GL/xmesa.h"
 
 #include <assert.h>
+#include <paths.h>
 #include <signal.h>
 
 #ifdef __FreeBSD__
@@ -133,10 +134,10 @@
 glxInitLogs() {
    fprintf(stderr, "Initializing logs\n");
    
-   unlink("~/glx_debug.log");
+   unlink(_PATH_TMP "glx_debug.log");
    
    /* set up logging capabilities */
-   if (set_log_file("~/glx_debug.log")) {
+   if (set_log_file(_PATH_TMP "glx_debug.log")) {
       fprintf(stderr, "glX Error: error setting log file\n");
    }
    log_initialize();
@@ -269,9 +269,9 @@
               hwInitVisuals = NULL;
 #endif
            } else 
-           if ( (!strcmp("RIVA128", vga256InfoRec.chipset)) ||
-                (!strcmp("RIVATNT", vga256InfoRec.chipset)) ||
-                (!strcmp("RIVATNT2", vga256InfoRec.chipset)) )  {
+           if ( (strncmp("RIVA", vga256InfoRec.chipset, 4) == 0) &&
+                ((strstr(&vga256InfoRec.chipset[4], "128") != NULL) ||
+                 (strstr(&vga256InfoRec.chipset[4], "TNT") != NULL)) ) {
               hw_flag = GL_TRUE;
               /* XXX - may need to select correct one */ 
               glx_chipset = NV_RIVATNT; 
