summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2011-10-03 11:44:59 -0700
committerKeith Packard <keithp@keithp.com>2011-10-03 11:44:59 -0700
commitcf11ca360c2ded5ca309faa9d039160947387bb8 (patch)
treec0e23e276621f27b6e8e9e00320dde99b828ff9c
parent463dd87062edaa974cb8c7163328a53197f237e1 (diff)
parent6eae9fa28445b6cfa09061b338242df5116aafe8 (diff)
Merge remote-tracking branch 'jeremyhu/for-keith'
-rw-r--r--hw/xquartz/X11Application.m2
-rw-r--r--include/misc.h8
2 files changed, 6 insertions, 4 deletions
diff --git a/hw/xquartz/X11Application.m b/hw/xquartz/X11Application.m
index 7fd7dab3c..12ff53c88 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"));
diff --git a/include/misc.h b/include/misc.h
index 1fea73ec3..dc039113d 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;
}
@@ -277,7 +279,7 @@ static inline void __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];