pkgsrc/devel/cqual/patches/patch-bh

30 lines
1.3 KiB
Text

$NetBSD: patch-bh,v 1.1 2006/01/18 23:24:12 rillig Exp $
SunPro thinks that the result of the "," operator is not an lvalue.
Fixed this by using *&foo instead of foo.
--- src/libcompat/pages.c.orig 2003-09-11 21:03:24.000000000 +0200
+++ src/libcompat/pages.c 2006-01-16 14:11:33.668681000 +0100
@@ -299,7 +299,7 @@ static void preaccess_regionmap (pageid
}
}
-#define page_region(pagenb) (preaccess_regionmap(pagenb), __rcregionmap[(pagenb)/RPAGETABLESIZE2][(pagenb)%RPAGETABLESIZE2])
+#define page_region(pagenb) (*(preaccess_regionmap(pagenb), &(__rcregionmap[(pagenb)/RPAGETABLESIZE2][(pagenb)%RPAGETABLESIZE2])))
#else
@@ -322,10 +322,10 @@ static void preaccess_regionmap (pageid
}
}
-#define page_region(pagenb) (preaccess_regionmap(pagenb), \
- __rcregionmap[(pagenb)/(RPAGETABLESIZE2*RPAGETABLESIZE3)] \
+#define page_region(pagenb) (*(preaccess_regionmap(pagenb), \
+ &(__rcregionmap[(pagenb)/(RPAGETABLESIZE2*RPAGETABLESIZE3)] \
[((pagenb)%(RPAGETABLESIZE2*RPAGETABLESIZE3))/RPAGETABLESIZE3] \
- [(pagenb)%RPAGETABLESIZE3])
+ [(pagenb)%RPAGETABLESIZE3])))
#endif /* SIZEOF_VOIDP <= 4 */