Package: xwnc
Severity: normal
Tags: patch

When building 'xwnc' on amd64 with gcc-4.0,
I get the following error:

dispcur.c: In function 'rfbInitCursor':
dispcur.c:320: error: invalid lvalue in assignment
make[5]: *** [dispcur.o] Error 1
make[5]: Leaving directory `/xwnc-0.3.3/xserver/hw/wnc'

With the attached patch 'xwnc' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/xwnc-0.3.3/xserver/hw/wnc/dispcur.c 
./xserver/hw/wnc/dispcur.c
--- ../tmp-orig/xwnc-0.3.3/xserver/hw/wnc/dispcur.c     2004-08-26 
16:56:03.000000000 +0200
+++ ./xserver/hw/wnc/dispcur.c  2005-02-28 15:29:29.971734194 +0100
@@ -317,7 +317,7 @@
      if (!ScreenPriv)
           return FALSE;
 
-     CURSOR_PRIV(pScreen) = ScreenPriv;
+     pScreen->devPrivates[rfbCursorScreenIndex].ptr = ScreenPriv;
 
      /* override some screen procedures */
      ScreenPriv->QueryBestSize = pScreen->QueryBestSize;
diff -urN ../tmp-orig/xwnc-0.3.3/xserver/hw/wnc/rootlessScreen.c 
./xserver/hw/wnc/rootlessScreen.c
--- ../tmp-orig/xwnc-0.3.3/xserver/hw/wnc/rootlessScreen.c      2004-08-26 
16:56:02.000000000 +0200
+++ ./xserver/hw/wnc/rootlessScreen.c   2005-02-28 15:31:50.390630757 +0100
@@ -567,7 +567,7 @@
 
     s = xalloc(sizeof(RootlessScreenRec));
     if (! s) return FALSE;
-    SCREENREC(pScreen) = s;
+    pScreen->devPrivates[rootlessScreenPrivateIndex].ptr = s;
 
     s->pixmap_data = NULL;
     s->pixmap_data_size = 0;
diff -urN ../tmp-orig/xwnc-0.3.3/xserver/hw/wnc/rootlessWindow.c 
./xserver/hw/wnc/rootlessWindow.c
--- ../tmp-orig/xwnc-0.3.3/xserver/hw/wnc/rootlessWindow.c      2004-08-26 
16:56:05.000000000 +0200
+++ ./xserver/hw/wnc/rootlessWindow.c   2005-02-28 15:34:10.637560512 +0100
@@ -64,7 +64,7 @@
     Bool result;
     RegionRec saveRoot;
 
-    WINREC(pWin) = NULL;
+    pWin->devPrivates[rootlessWindowPrivateIndex].ptr = NULL;
 
     SCREEN_UNWRAP(pWin->drawable.pScreen, CreateWindow);
 
@@ -105,7 +105,7 @@
 #endif
 
     xfree(winRec);
-    WINREC(pWin) = NULL;
+    pWin->devPrivates[rootlessWindowPrivateIndex].ptr = NULL;
 }
 
 
@@ -349,7 +349,7 @@
     winRec->pixmap = NULL;
     winRec->wid = NULL;
 
-    WINREC(pWin) = winRec;
+    pWin->devPrivates[rootlessWindowPrivateIndex].ptr = winRec;
 
 #ifdef SHAPE
     // Set the frame's shape if the window is shaped
@@ -366,7 +366,7 @@
     {
         RL_DEBUG_MSG("implementation failed to create frame!\n");
         xfree(winRec);
-        WINREC(pWin) = NULL;
+        pWin->devPrivates[rootlessWindowPrivateIndex].ptr = NULL;
         return NULL;
     }
 
@@ -1261,8 +1261,8 @@
 
        /* Switch the frame record from one to the other. */
 
-       WINREC(pWin) = NULL;
-       WINREC(pTopWin) = winRec;
+       pWin->devPrivates[rootlessWindowPrivateIndex].ptr = NULL;
+       pTopWin->devPrivates[rootlessWindowPrivateIndex].ptr = winRec;
 
        RootlessInitializeFrame(pTopWin, winRec);
        RootlessReshapeFrame(pTopWin);


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

Reply via email to