diff options
author | Matthieu Herrb <matthieu.herrb@laas.fr> | 2012-11-16 16:11:02 +0100 |
---|---|---|
committer | Matthieu Herrb <matthieu.herrb@laas.fr> | 2012-11-16 16:11:02 +0100 |
commit | 8a39ebc087cc325832a9d9f1cbb7ce55d18aab07 (patch) | |
tree | 4291baca350ca30ac4b48aa135b0c36292ac6d3f | |
parent | 78e32d069615ae6a9feea5c80bf455e9289a5748 (diff) | |
parent | 01aac1f533d211c90a50127cc82a56bebb44dd0d (diff) |
Merge remote-tracking branch 'origin/server-1.12-branch' into obsd-server-1.12-branchobsd-server-1.12-branch
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | hw/xfree86/common/xf86.h | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Helper.c | 6 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Module.h | 2 | ||||
-rw-r--r-- | hw/xquartz/xpr/dri.c | 6 | ||||
-rw-r--r-- | include/dix-config.h.in | 3 | ||||
-rw-r--r-- | include/list.h | 21 | ||||
-rw-r--r-- | test/list.c | 4 |
8 files changed, 39 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index 84397be53..215e75e56 100644 --- a/configure.ac +++ b/configure.ac @@ -136,6 +136,7 @@ AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST +AC_C_TYPEOF AC_C_BIGENDIAN([ENDIAN="X_BIG_ENDIAN"], [ENDIAN="X_LITTLE_ENDIAN"]) AC_CHECK_SIZEOF([unsigned long]) diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h index fc4c34e92..7b1fc84f0 100644 --- a/hw/xfree86/common/xf86.h +++ b/hw/xfree86/common/xf86.h @@ -451,4 +451,7 @@ VidModeExtensionInit(ScreenPtr pScreen); #endif /* _NO_XF86_PROTOTYPES */ +/* Update the internal total dimensions of all ScreenRecs together */ +extern _X_EXPORT void +xf86UpdateDesktopDimensions(void); #endif /* _XF86_H */ diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c index 8c948cf6f..0787171fb 100644 --- a/hw/xfree86/common/xf86Helper.c +++ b/hw/xfree86/common/xf86Helper.c @@ -1834,3 +1834,9 @@ xf86MotionHistoryAllocate(InputInfoPtr pInfo) { AllocateMotionHistory(pInfo->dev); } + +void +xf86UpdateDesktopDimensions(void) +{ + update_desktop_dimensions(); +} diff --git a/hw/xfree86/common/xf86Module.h b/hw/xfree86/common/xf86Module.h index 0036c5935..b5e030fc4 100644 --- a/hw/xfree86/common/xf86Module.h +++ b/hw/xfree86/common/xf86Module.h @@ -82,7 +82,7 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 1) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(12, 2) #define ABI_XINPUT_VERSION SET_ABI_VERSION(16, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(6, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c index 002ec94a7..9bac56851 100644 --- a/hw/xquartz/xpr/dri.c +++ b/hw/xquartz/xpr/dri.c @@ -68,6 +68,7 @@ #include "mi.h" #include "mipointer.h" #include "rootless.h" +#include "rootlessCommon.h" #include "x-hash.h" #include "x-hook.h" #include "driWrap.h" @@ -384,6 +385,11 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id, DRIDrawablePrivPtr pDRIDrawablePriv; if (pDrawable->type == DRAWABLE_WINDOW) { + /* <rdar://problem/12338921> + * http://bugs.winehq.org/show_bug.cgi?id=31751 + */ + RootlessStopDrawing((WindowPtr)pDrawable, FALSE); + pDRIDrawablePriv = CreateSurfaceForWindow(pScreen, (WindowPtr)pDrawable, &wid); diff --git a/include/dix-config.h.in b/include/dix-config.h.in index 9e8284286..f66b7268b 100644 --- a/include/dix-config.h.in +++ b/include/dix-config.h.in @@ -423,6 +423,9 @@ /* Define to 64-bit byteswap macro */ #undef bswap_64 +/* Define to 1 if typeof works with your compiler. */ +#undef HAVE_TYPEOF + /* The compiler supported TLS storage class, prefering initial-exec if tls_model is supported */ #undef TLS diff --git a/include/list.h b/include/list.h index d54a207b1..2d48a8646 100644 --- a/include/list.h +++ b/include/list.h @@ -26,6 +26,8 @@ #ifndef _XORG_LIST_H_ #define _XORG_LIST_H_ +#include <stddef.h> /* offsetof() */ + /** * @file Classic doubly-link circular list implementation. * For real usage examples of the linked list, see the file test/list.c @@ -232,7 +234,7 @@ xorg_list_is_empty(struct xorg_list *head) */ #ifndef container_of #define container_of(ptr, type, member) \ - (type *)((char *)(ptr) - (char *) &((type *)0)->member) + (type *)((char *)(ptr) - offsetof(type, member)) #endif /** @@ -271,9 +273,20 @@ xorg_list_is_empty(struct xorg_list *head) #define xorg_list_last_entry(ptr, type, member) \ xorg_list_entry((ptr)->prev, type, member) -#define __container_of(ptr, sample, member) \ - (void *)((char *)(ptr) \ - - ((char *)&(sample)->member - (char *)(sample))) +#ifdef HAVE_TYPEOF +#define __container_of(ptr, sample, member) \ + container_of(ptr, typeof(*sample), member) +#else +/* This implementation of __container_of has undefined behavior according + * to the C standard, but it works in many cases. If your compiler doesn't + * support typeof() and fails with this implementation, please try a newer + * compiler. + */ +#define __container_of(ptr, sample, member) \ + (void *)((char *)(ptr) \ + - ((char *)&(sample)->member - (char *)(sample))) +#endif + /** * Loop through the list given by head and set pos to struct in the list. * diff --git a/test/list.c b/test/list.c index 82d232706..f9f54ee4e 100644 --- a/test/list.c +++ b/test/list.c @@ -137,7 +137,7 @@ static void test_xorg_list_del(void) { struct parent parent = { 0 }; - struct child child[3]; + struct child child[2]; struct child *c; xorg_list_init(&parent.children); @@ -178,8 +178,8 @@ test_xorg_list_del(void) xorg_list_add(&child[0].node, &parent.children); xorg_list_del(&parent.children); assert(xorg_list_is_empty(&parent.children)); + assert(!xorg_list_is_empty(&child[0].node)); assert(!xorg_list_is_empty(&child[1].node)); - assert(!xorg_list_is_empty(&child[2].node)); } static void |