Dave pointed out that there are a couple drivers (sis, sisusb, vmware) that use the swapl/swaps macros. My recent patch series dropped the n argument from the macros, causing these drivers to not build.
Ideally, we'd like a deprecation warning when the second argument is
given, but by removing the second argument, we'd lose compatibility with
old servers.
We could modify the swap macros in the server with the following patch,
or we could update the drivers to use a single argument
#if XORG_VERSION_CURRENT > XORG_VERSION_NUMERIC(1, 11, 99, 0).
Thoughts?
Matt
diff --git a/include/misc.h b/include/misc.h
index 1fea73e..8328555 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -285,7 +285,7 @@ static inline void swap_uint32(uint32_t *x)
((char *) x)[2] = n;
}
-#define swapl(x) do { \
+#define swapl(x, ...) do { \
if (sizeof(*(x)) != 4) \
wrong_size(); \
if (__builtin_constant_p((uintptr_t)(x) & 3) && ((uintptr_t)(x)
& 3) == 0) \
@@ -302,7 +302,7 @@ static inline void swap_uint16(uint16_t *x)
((char *) x)[1] = n;
}
-#define swaps(x) do { \
+#define swaps(x, ...) do { \
if (sizeof(*(x)) != 2) \
wrong_size(); \
if (__builtin_constant_p((uintptr_t)(x) & 1) && ((uintptr_t)(x)
& 1) == 0) \
pgp02VQojok5K.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
