Subject: windowmaker-0.91.0 patch
To: None <port-amd64@NetBSD.org>
From: Xning Lee <xning@soforge.com>
List: port-amd64
Date: 12/13/2004 14:36:59
WindowMaker-0.91 don't run well in port-amd64, here is my patch:
Patch 1:
=======
--- src/wmspec.c.orig Mon Oct 25 03:36:15 2004
+++ src/wmspec.c Fri Dec 10 23:42:44 2004
@@ -382,18 +382,19 @@
&nitems_return, &bytes_after_return, &prop_return);
if (rc==Success && prop_return) {
- unsigned int *data = (unsigned int *)prop_return;
- unsigned int pos = 0, len = 0;
- unsigned int best_pos = 0, best_tmp = ~0;
+ long *data = (long *)prop_return;
+ long pos = 0, len = 0;
+ long best_pos = 0, best_tmp = ~0;
extern WPreferences wPreferences;
- unsigned int pref_size = wPreferences.icon_size;
- unsigned int pref_sq = pref_size*pref_size;
+ long pref_size = wPreferences.icon_size;
+ long pref_sq = pref_size*pref_size;
char *src, *dst;
RImage *new_rimage;
do {
+ unsigned long tmp;
len = data[pos+0]*data[pos+1];
- unsigned int tmp = pref_sq-len;
+ tmp = pref_sq-len;
if (tmp < best_tmp && tmp > 0) {
best_tmp = tmp;
best_pos = pos;
@@ -405,7 +406,7 @@
len = data[best_pos+0] * data[best_pos+1];
src = (char*)&data[best_pos+2];
dst = new_rimage->data;
- for (pos=0; pos<len; ++pos, src+=4, dst+=4) {
+ for (pos=0; pos<len; ++pos, src+=sizeof(long), dst+=4) {
dst[0] = src[2]; /* R */
dst[1] = src[1]; /* G */
dst[2] = src[0]; /* B */
Patch 2:
========
--- WINGs/wwindow.c.orig Sun Oct 24 10:58:20 2004
+++ WINGs/wwindow.c Fri Dec 10 23:08:09 2004
@@ -254,14 +254,14 @@
setMiniwindow(WMWindow *win, RImage *image)
{
WMScreen *scr= win->view->screen;
- CARD32 *data;
+ long *data;
int x, y;
int o;
if (!image)
return;
- data = wmalloc((image->width * image->height + 2) * sizeof(CARD32));
+ data = wmalloc((image->width * image->height + 2) * sizeof(long));
o= 0;
data[o++] = image->width;