Attached is an updated patch to make the latest version
of the 'quake2' package compile on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/quake2-0.3/src/gl_glx.c ./src/gl_glx.c
--- ../tmp-orig/quake2-0.3/src/gl_glx.c 2004-03-15 02:25:43.000000000 +0000
+++ ./src/gl_glx.c      2005-07-22 13:26:14.000000000 +0000
@@ -214,9 +214,10 @@
 
 #ifdef HAVE_XF86_VIDMODE
 static XF86VidModeModeInfo **vidmodes;
+static int num_vidmodes;
+static qboolean vidmode_ext = false;
 #endif // HAVE_XF86_VIDMODE
 //static int default_dotclock_vidmode;
-static int num_vidmodes;
 static qboolean vidmode_active = false;
 
 /* hardware gamma */
@@ -228,7 +229,6 @@
 
 static qboolean mouse_active = false;
 static qboolean dgamouse = false;
-static qboolean vidmode_ext = false;
 
 /* stencilbuffer shadows */
 qboolean have_stencil = false;
@@ -1008,8 +1008,6 @@
        XWMHints *wmhints;
        unsigned long mask;
        int MajorVersion, MinorVersion;
-       int actualWidth, actualHeight;
-       int i;
 
        r_fakeFullscreen = ri.Cvar_Get( "r_fakeFullscreen", "0", CVAR_ARCHIVE);
 
@@ -1106,6 +1104,8 @@
        }
 
 #ifdef HAVE_XF86_VIDMODE
+       int actualWidth, actualHeight;
+       int i;
        if (vidmode_ext) {
                int best_fit, best_dist, dist, x, y;
                
diff -urN ../tmp-orig/quake2-0.3/src/rw_x11.c ./src/rw_x11.c
--- ../tmp-orig/quake2-0.3/src/rw_x11.c 2004-03-16 09:57:43.000000000 +0000
+++ ./src/rw_x11.c      2005-07-22 13:20:23.000000000 +0000
@@ -550,9 +550,9 @@
                                 CurrentTime);
 
        if (in_dgamouse->value) {
-               int MajorVersion, MinorVersion;
 
 #ifdef HAVE_XF86_DGA
+               int MajorVersion, MinorVersion;
                if (!XF86DGAQueryVersion(dpy, &MajorVersion, &MinorVersion)) { 
                        // unable to query, probalby not supported
                        ri.Con_Printf( PRINT_ALL, "Failed to detect XF86DGA 
Mouse\n" );
diff -urN ../tmp-orig/quake2-0.3/src/snd_alsa.c ./src/snd_alsa.c
--- ../tmp-orig/quake2-0.3/src/snd_alsa.c       2004-03-15 02:25:43.000000000 
+0000
+++ ./src/snd_alsa.c    2005-07-22 13:37:19.000000000 +0000
@@ -101,7 +101,7 @@
     if (!si->dma->speed) {
        for (i = 0; i < sizeof(tryrates); i++) {
            int dir = 0;
-           int test = tryrates[i];
+           unsigned int test = tryrates[i];
 
            if ((err = snd_pcm_hw_params_set_rate_near(pcm_handle, hw_params,
                                                       &test, &dir)) < 0) {
diff -urN ../tmp-orig/quake2-0.3/src/snd_ao.c ./src/snd_ao.c
--- ../tmp-orig/quake2-0.3/src/snd_ao.c 2004-03-15 02:25:43.000000000 +0000
+++ ./src/snd_ao.c      2005-07-22 13:36:06.000000000 +0000
@@ -157,7 +157,7 @@
     /* ao_play returns success, not number of samples successfully output
      * unlike alsa or arts, so we can only assume that the whole buffer
      * made it out... though this makes updating si->dma->samplepos easy */
-    if (ao_play(device, si->dma->buffer, si->dma->samples * samplesize) == 0) {
+    if (ao_play(device, (char*)si->dma->buffer, si->dma->samples * samplesize) 
== 0) {
        Com_Printf("W: error occurred while playing buffer\n");
        ao_close(device);
        ao_shutdown();
diff -urN ../tmp-orig/quake2-0.3/src/snd_mix.c ./src/snd_mix.c
--- ../tmp-orig/quake2-0.3/src/snd_mix.c        2002-07-13 02:02:00.000000000 
+0000
+++ ./src/snd_mix.c     2005-07-22 13:44:09.000000000 +0000
@@ -449,7 +449,7 @@
        //as it would always be zero.
        lscale = snd_scaletable[ ch->leftvol >> 3];
        rscale = snd_scaletable[ ch->rightvol >> 3];
-       sfx = (signed char *)sc->data + ch->pos;
+       sfx = (unsigned char *)sc->data + ch->pos;
 
        samp = &paintbuffer[offset];
 


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to