pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/37054 (WindowMaker triggers a crash in Xlib on sparc64)



martin%netbsd.org@localhost wrote:
> Synopsis: WindowMaker triggers a crash in Xlib on sparc64
> 
> Responsible-Changed-From-To: xsrc-manager->pkg-manager
> Responsible-Changed-By: martin%netbsd.org@localhost
> Responsible-Changed-When: Tue, 02 Oct 2007 14:03:29 +0000
> Responsible-Changed-Why:
> It's a pkg problem

The attached patch got WindowMaker to start correctly.
There are probably many, many more places to fix though.

Cheers,
-- 
khorben
$NetBSD$

--- src/wmspec.c.orig   2007-10-02 15:40:36.000000000 +0200
+++ src/wmspec.c
@@ -27,6 +27,8 @@
  * This file needs to be checked for all calls to XGetWindowProperty() and
  * proper checks need to be made on the returned values. Only checking for
  * return to be Success is not enough. -Dan
+ * This file also needs to be checked for all calls to XChangeProperty(),
+ * where the fifth argument needs to be aligned on the size of long.
  */
 
 #include "wconfig.h"
@@ -392,7 +394,8 @@ wNETWMGetCurrentDesktopFromHint(WScreen 
 static CARD32*
 findBestIcon(CARD32 *data, unsigned long items)
 {
-    int size, wanted, d, distance;
+    int size, wanted;
+    long d, distance;
     unsigned long i;
     CARD32 *icon;
 
@@ -487,7 +490,7 @@ updateIconImage(WScreen *scr, WWindow *w
 static void
 updateShowDesktop(WScreen * scr, Bool show)
 {
-    CARD32 foo;
+    long foo;
 
     foo = (show == True);
     XChangeProperty(dpy, scr->root_win, net_showing_desktop, XA_CARDINAL, 32,
@@ -793,7 +796,7 @@ updateClientListStacking(WScreen *scr, W
 static void
 updateWorkspaceCount(WScreen *scr) /* changeable */
 {
-    CARD32 count;
+    long count;
 
     count = scr->workspace_count;
 
@@ -805,7 +808,7 @@ updateWorkspaceCount(WScreen *scr) /* ch
 static void
 updateCurrentWorkspace(WScreen *scr) /* changeable */
 {
-    CARD32 count;
+    long count;
 
     count = scr->current_workspace;
 
@@ -852,7 +855,7 @@ updateFocusHint(WScreen *scr, WWindow *w
 static void
 updateWorkspaceHint(WWindow *wwin, Bool fake, Bool del)
 {
-    CARD32 l;
+    long l;
 
     if (del) {
         XDeleteProperty(dpy, wwin->client_win, net_wm_desktop);


Home | Main Index | Thread Index | Old Index