misc fxmesa-3.4 fixes / updates:
- increased fx_fast_tab->clip[] array size from GL_POLYGON+1 to
GL_POLYGON+2: fx_init_fastpath() was writing beyond array border.
ugh, VERY nasty.. (fxfastpath.c/fxfasttmp.h -- found by gcc-4.9.)
- made fxMesaGetProcAddress() to call _glapi_get_proc_address()
and removed the static array of extension functions which was
copied from fxwgl.c.
- removed the runtime mesa config file stuff from dos builds.
- added a standalone linux/glx (libGL.so) Makefile for fxMesa.
- other minor fixes elsewhere in the source.

diff -urNp Mesa-3.4.2/src/FX/fxfastpath.c Mesa-3.4.2x/src/FX/fxfastpath.c
--- Mesa-3.4.2/src/FX/fxfastpath.c	2000-10-23 02:10:50.000000000 +0300
+++ Mesa-3.4.2x/src/FX/fxfastpath.c	2016-03-18 18:01:10.000000000 +0200
@@ -234,7 +234,7 @@ struct fx_fast_tab
 {
    void (*build_vertices)( struct vertex_buffer *VB, GLuint do_clip );
 
-   void (*clip[GL_POLYGON+1])( struct vertex_buffer *VB,
+   void (*clip[GL_POLYGON+2])( struct vertex_buffer *VB,
 			       GLuint start,
 			       GLuint count,
 			       GLuint parity );
diff -urNp Mesa-3.4.2/src/FX/fxdos.c Mesa-3.4.2x/src/FX/fxdos.c
--- Mesa-3.4.2/src/FX/fxdos.c	2015-10-05 05:50:00.000000000 +0300
+++ Mesa-3.4.2x/src/FX/fxdos.c	2016-03-18 18:01:10.000000000 +0200
@@ -55,6 +55,7 @@
 #include "GL/gl.h"
 #include "GL/fxmesa.h"
 
+#if 0
 /* copied from fxwgl.c */
 
 struct __extensions__
@@ -146,4 +147,12 @@ fxMesaProc fxMesaGetProcAddress(const ch
   return NULL;
 }
 
+#else
+fxMesaProc fxMesaGetProcAddress(const char * sym)
+{
+   fxMesaProc p = (fxMesaProc)_glapi_get_proc_address(sym);
+   return p;
+}
+#endif
+
 #endif
diff -urNp Mesa-3.4.2/src/FX/fxwgl.c Mesa-3.4.2x/src/FX/fxwgl.c
--- Mesa-3.4.2/src/FX/fxwgl.c	2001-04-03 18:45:05.000000000 +0300
+++ Mesa-3.4.2x/src/FX/fxwgl.c	2016-03-18 18:01:10.000000000 +0200
@@ -116,7 +116,7 @@ static struct __extensions__   ext[] = {
    { (PROC)glGetColorTableParameterivEXT,	"glGetColorTableParameterivEXT"	},
    { (PROC)glPointParameterfEXT,		"glPointParameterfEXT"		},
    { (PROC)glPointParameterfvEXT,		"glPointParameterfvEXT"		},
-   { (PROC)glBlendFuncSeparateINGR,		"glBlendFuncSeparateINGR"	},
+/* { (PROC)glBlendFuncSeparateINGR,		"glBlendFuncSeparateINGR"	},*/
    { (PROC)glActiveTextureARB,                  "glActiveTextureARB"		},
    { (PROC)glClientActiveTextureARB,            "glClientActiveTextureARB"	},
    { (PROC)glMultiTexCoord1dARB,                "glMultiTexCoord1dARB"		},
diff -urNp Mesa-3.4.2/src/X86/common_x86_asm.S Mesa-3.4.2x/src/X86/common_x86_asm.S
--- Mesa-3.4.2/src/X86/common_x86_asm.S	2016-03-15 07:55:00.000000000 +0200
+++ Mesa-3.4.2x/src/X86/common_x86_asm.S	2016-03-18 18:01:10.000000000 +0200
@@ -111,7 +111,7 @@ GLNAME( gl_identify_x86_cpu_features ):
 	/* Mask out highest bit, which is used by AMD for 3dnow
          * Newer Intel have this bit set, but do not support 3dnow 
  	 */
-        AND_L   ( CONST(0X7FFFFFFF), EAX)
+        AND_L   ( CONST(0x7FFFFFFF), EAX)
 	JMP	( LLBL( cpuid_done ) )
 
 LLBL( cpuid_amd ):
diff -urNp Mesa-3.4.2/src/context.c Mesa-3.4.2x/src/context.c
--- Mesa-3.4.2/src/context.c	2001-04-04 15:53:21.000000000 +0300
+++ Mesa-3.4.2x/src/context.c	2016-03-18 18:01:10.000000000 +0200
@@ -1670,7 +1670,9 @@ gl_destroy_context( GLcontext *ctx )
 void
 gl_context_initialize( GLcontext *ctx )
 {
+#ifndef __MSDOS__
    gl_read_config_file( ctx );
+#endif
 }
 
 
diff -urNp Mesa-3.4.2/src/Makefile.dxe Mesa-3.4.2x/src/Makefile.dxe
--- Mesa-3.4.2/src/Makefile.dxe	2015-10-05 05:50:10.000000000 +0300
+++ Mesa-3.4.2x/src/Makefile.dxe	2016-03-18 18:01:10.000000000 +0200
@@ -36,7 +36,6 @@ CORE_SOURCES = \
 	buffers.c \
 	clip.c \
 	colortab.c \
-	config.c \
 	context.c \
 	copypix.c \
 	cva.c \
@@ -106,6 +105,7 @@ CORE_SOURCES = \
 	X86/common_x86.c \
 	X86/3dnow.c \
 	X86/katmai.c
+#	config.c 
 
 DRIVER_SOURCES = \
 	FX/fxapi.c \
diff -urNp Mesa-3.4.2/src/Makefile.x11 Mesa-3.4.2x/src/Makefile.x11
--- Mesa-3.4.2/src/Makefile.x11	1970-01-01 02:00:00.000000000 +0200
+++ Mesa-3.4.2x/src/Makefile.x11	2016-03-18 18:01:10.000000000 +0200
@@ -0,0 +1,179 @@
+# Mesa 3-D graphics library
+# Version:  3.4
+# Copyright (C) 1995-2000  Brian Paul
+
+# standalone Makefile for fxMesa libGL.so
+
+INCDIR = ../include
+LIBDIR = ../lib
+G3DIR  = ../glide3
+
+GL_LIB = libGL.so
+
+CC = gcc
+LD = $(CC)
+
+CFLAGS = -O2 -mtune=i586 -fPIC -ffast-math -fomit-frame-pointer \
+	-DUSE_XSHM -DPTHREADS \
+	-DFX -DUSE_X86_ASM -DUSE_MMX_ASM -DUSE_3DNOW_ASM -DUSE_KATMAI_ASM -IFX/X86 \
+	-DFX_GLIDE3 -I$(G3DIR)/include -I. -I$(INCDIR)
+
+LDFLAGS = -shared -Wl,--no-undefined
+LDLIBS = -L/usr/X11R6/lib -lX11 -lXext -L$(G3DIR)/lib -lglide3 -lm -lpthread
+
+CORE_SOURCES = \
+	aatriangle.c \
+	accum.c \
+	alpha.c \
+	alphabuf.c \
+	attrib.c \
+	bbox.c \
+	bitmap.c \
+	blend.c \
+	buffers.c \
+	clip.c \
+	colortab.c \
+	config.c \
+	context.c \
+	copypix.c \
+	cva.c \
+	debug_xform.c \
+	depth.c \
+	dispatch.c \
+	dlist.c \
+	drawpix.c \
+	enable.c \
+	enums.c \
+	eval.c \
+	extensions.c \
+	feedback.c \
+	fog.c \
+	get.c \
+	glapi.c \
+	glapinoop.c \
+	glthread.c \
+	hash.c \
+	hint.c \
+	image.c \
+	imaging.c \
+	light.c \
+	lines.c \
+	logic.c \
+	masking.c \
+	matrix.c \
+	mem.c \
+	mmath.c \
+	pb.c \
+	pipeline.c \
+	pixel.c \
+	pixeltex.c \
+	points.c \
+	polygon.c \
+	quads.c \
+	rastpos.c \
+	readpix.c \
+	rect.c \
+	scissor.c \
+	shade.c \
+	span.c \
+	stages.c \
+	state.c \
+	stencil.c \
+	texformat.c \
+	teximage.c \
+	texobj.c \
+	texstate.c \
+	texture.c \
+	texutil.c \
+	translate.c \
+	triangle.c \
+	varray.c \
+	vb.c \
+	vbcull.c \
+	vbfill.c \
+	vbindirect.c \
+	vbrender.c \
+	vbxform.c \
+	vector.c \
+	vertices.c \
+	winpos.c \
+	xform.c \
+	zoom.c \
+	X86/x86.c \
+	X86/common_x86.c \
+	X86/3dnow.c \
+	X86/katmai.c
+
+DRIVER_SOURCES = \
+	X/glxapi.c \
+	X/fakeglx.c \
+	X/xfonts.c \
+	X/xmesa1.c \
+	X/xmesa2.c \
+	X/xmesa3.c \
+	X/xmesa4.c \
+	OSmesa/osmesa.c \
+	FX/fxapi.c \
+	FX/fxclip.c \
+	FX/fxcva.c \
+	FX/fxdd.c \
+	FX/fxddspan.c \
+	FX/fxddtex.c \
+	FX/fxfastpath.c \
+	FX/fxpipeline.c \
+	FX/fxrender.c \
+	FX/fxsanity.c \
+	FX/fxsetup.c \
+	FX/fxtexman.c \
+	FX/fxtrifuncs.c \
+	FX/fxvsetup.c \
+	FX/fxglidew.c
+
+ASM_SOURCES = X86/common_x86_asm.S X86/glapi_x86.S \
+	X86/x86_xform_raw2.S X86/x86_xform_raw3.S \
+	X86/x86_xform_raw4.S X86/x86_xform_masked2.S \
+	X86/x86_xform_masked3.S X86/x86_xform_masked4.S \
+	X86/x86_cliptest.S X86/x86_vertex.S \
+	X86/mmx_blend.S \
+	X86/3dnow_xform_raw1.S X86/3dnow_xform_raw2.S \
+	X86/3dnow_xform_raw3.S X86/3dnow_xform_raw4.S \
+	X86/3dnow_xform_masked1.S X86/3dnow_xform_masked2.S \
+	X86/3dnow_xform_masked3.S X86/3dnow_xform_masked4.S \
+	X86/3dnow_norm_raw.S X86/3dnow_vertex.S \
+	FX/X86/fx_3dnow_fastpath.S \
+	X86/katmai_xform_raw1.S X86/katmai_xform_masked1.S \
+	X86/katmai_xform_raw2.S X86/katmai_xform_masked2.S \
+	X86/katmai_xform_raw3.S X86/katmai_xform_masked3.S \
+	X86/katmai_xform_raw4.S X86/katmai_xform_masked4.S \
+	X86/katmai_norm_raw.S X86/katmai_vertex.S
+
+ADDITIONAL_OBJ =
+
+OBJECTS = $(ASM_SOURCES:.S=.o) \
+	$(CORE_SOURCES:.c=.o) \
+	$(DRIVER_SOURCES:.c=.o) \
+	$(ADDITIONAL_OBJ)
+
+
+##### RULES #####
+
+.c.o:
+	$(CC) -c $(CFLAGS) $< -o $@
+.S.o:
+	$(CC) -c $(CFLAGS) $< -o $@
+
+##### TARGETS #####
+
+all: $(LIBDIR)/$(GL_LIB)
+
+clean:
+	rm -f *.o X86/*.o X/*.o OSmesa/*.o FX/*.o FX/X86/*.o
+realclean: clean
+	rm -f $(LIBDIR)/*.a $(LIBDIR)/*.so*
+
+$(LIBDIR):
+	-mkdir $(LIBDIR)
+
+$(LIBDIR)/$(GL_LIB): $(LIBDIR) $(OBJECTS)
+	$(LD) $(LDFLAGS) -o $@ $(OBJECTS) $(LDLIBS)
+
diff -urNp Mesa-3.4.2/src/X/glxapi.c Mesa-3.4.2x/src/X/glxapi.c
--- Mesa-3.4.2/src/X/glxapi.c	2000-06-09 01:50:28.000000000 +0300
+++ Mesa-3.4.2x/src/X/glxapi.c	2016-03-18 18:01:10.000000000 +0200
@@ -34,6 +34,8 @@
 
 #include <assert.h>
 #include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
 #include "glapi.h"
 #include "glxapi.h"
 
diff -urNp Mesa-3.4.2/src/X/xmesa2.c Mesa-3.4.2x/src/X/xmesa2.c
--- Mesa-3.4.2/src/X/xmesa2.c	2001-05-15 23:14:51.000000000 +0300
+++ Mesa-3.4.2x/src/X/xmesa2.c	2016-03-18 18:01:10.000000000 +0200
@@ -2190,7 +2190,7 @@ static void write_span_8R8G8B24_ximage( 
                   pixel &= 0x00ffffff;
                   pixel |= rgba[i][BCOMP] << 24;
                   *ptr4++ = pixel;
-                  pixel = *ptr4 && 0xffff0000;
+                  pixel = *ptr4 & 0xffff0000;
                   pixel |= rgba[i][GCOMP];
                   pixel |= rgba[i][RCOMP] << 8;
                   *ptr4 = pixel;
@@ -2200,7 +2200,7 @@ static void write_span_8R8G8B24_ximage( 
                   pixel |= rgba[i][BCOMP] << 16;
                   pixel |= rgba[i][GCOMP] << 24;
                   *ptr4++ = pixel;
-                  pixel = *ptr4 && 0xffffff00;
+                  pixel = *ptr4 & 0xffffff00;
                   pixel |= rgba[i][RCOMP];
                   *ptr4 = pixel;
                   break;
@@ -2230,7 +2230,7 @@ static void write_span_8R8G8B24_ximage( 
             pixel &= 0x00ffffff;
             pixel |= rgba[i][BCOMP] << 24;
             *ptr4++ = pixel;
-            pixel = *ptr4 && 0xffff0000;
+            pixel = *ptr4 & 0xffff0000;
             pixel |= rgba[i][GCOMP];
             pixel |= rgba[i++][RCOMP] << 8;
             *ptr4 = pixel;
@@ -2241,7 +2241,7 @@ static void write_span_8R8G8B24_ximage( 
             pixel |= rgba[i][BCOMP] << 16;
             pixel |= rgba[i][GCOMP] << 24;
             *ptr4++ = pixel;
-            pixel = *ptr4 && 0xffffff00;
+            pixel = *ptr4 & 0xffffff00;
             pixel |= rgba[i++][RCOMP];
             *ptr4 = pixel;
             if (0 == --w)
diff -urNp Mesa-3.4.2/src/attrib.h Mesa-3.4.2x/src/attrib.h
--- Mesa-3.4.2/src/attrib.h	2000-02-03 00:03:31.000000000 +0200
+++ Mesa-3.4.2x/src/attrib.h	2016-03-18 18:01:10.000000000 +0200
@@ -26,7 +26,7 @@
 
 
 #ifndef ATTRIB_H
-#define ATTRIB_h
+#define ATTRIB_H
 
 
 #include "types.h"
