xserver: Branch 'master' - 4 commits

Keith Packard keithp at kemper.freedesktop.org
Mon Oct 3 11:46:58 PDT 2011


 hw/xquartz/X11Application.m |    2 +-
 include/misc.h              |    8 +++++---
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit cf11ca360c2ded5ca309faa9d039160947387bb8
Merge: 463dd87... 6eae9fa...
Author: Keith Packard <keithp at keithp.com>
Date:   Mon Oct 3 11:44:59 2011 -0700

    Merge remote-tracking branch 'jeremyhu/for-keith'

commit 6eae9fa28445b6cfa09061b338242df5116aafe8
Author: Matt Turner <mattst88 at gmail.com>
Date:   Wed Sep 28 17:27:45 2011 -0400

    Remove incorrect & in swap_uint32
    
    Caused by commit 893e86a4, and hidden by the (char *) cast.
    
    Signed-off-by: Matt Turner <mattst88 at gmail.com>
    Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Jamey Sharp <jamey at minilop.net>
    Reviewed-by: Aaron Plattner <aplattner at nvidia.com>
    Tested-by: Aaron Plattner <aplattner at nvidia.com>

diff --git a/include/misc.h b/include/misc.h
index 0867746..dc03911 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -279,7 +279,7 @@ static inline int __builtin_constant_p(int x)
 /* byte swap a 32-bit value */
 static inline void swap_uint32(uint32_t *x)
 {
-	char n = ((char *) &x)[0];
+	char n = ((char *) x)[0];
 	((char *) x)[0] = ((char *) x)[3];
 	((char *) x)[3] = n;
 	n = ((char *) x)[1];
commit 38e9e28ba2fbffee52ad9889ef6d4e94c7af3e10
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Tue Sep 20 20:39:06 2011 -0700

    XQuartz: Use set_front_process rather than X11ApplicationSetFrontProcess since we're already in the AppKit thread
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>

diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 7fd7dab..12ff53c 100644
--- a/hw/xquartz/X11Application.m
+++ b/hw/xquartz/X11Application.m
@@ -356,7 +356,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) {
                          */
                         _appFlags._active = YES;
 
-                        X11ApplicationSetFrontProcess();
+                        [self set_front_process:nil];
 
                         /* Get the Spaces preference for SwitchOnActivate */
                         (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock"));
commit 206b30ebc608d29a91cc18665d89e887cac4dba3
Author: Jeremy Huddleston <jeremyhu at apple.com>
Date:   Thu Sep 22 18:55:19 2011 -0700

    Address regressions from e8ff555b95ba and d206d52f657c to work with other compilers
    
    1) The error attribute appeared in gcc-4.3
    2) The return type of __builtin_constant_p is int
    3) Sun Studio 12.0 and later builtin support for __builtin_constant_p
    
    Found by Tinderbox.
    
    Signed-off-by: Jeremy Huddleston <jeremyhu at apple.com>
    Reviewed-by: Matt Turner <mattst88 at gmail.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith at oracle.com>
    Reviewed-by: Aaron Plattner <aplattner at nvidia.com>

diff --git a/include/misc.h b/include/misc.h
index 1fea73e..0867746 100644
--- a/include/misc.h
+++ b/include/misc.h
@@ -261,14 +261,16 @@ version_compare(uint16_t a_major, uint16_t a_minor,
 #define SwapRestL(stuff) \
     SwapLongs((CARD32 *)(stuff + 1), LengthRestL(stuff))
 
-#ifdef __GNUC__
+#if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
 void __attribute__((error("wrong sized variable passed to swap"))) wrong_size(void);
 #else
 static inline void wrong_size(void)
 {
 }
+#endif
 
-static inline void __builtin_constant_p(int x)
+#if !(defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C < 0x590)))
+static inline int __builtin_constant_p(int x)
 {
 	return 0;
 }


More information about the xorg-commit mailing list