aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/include/misc.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-10-05 17:37:34 +0200
committermarha <marha@users.sourceforge.net>2011-10-05 17:37:34 +0200
commitf7025b4baa1ba35ee796785641f04eac5bedb0a6 (patch)
tree3df62b7b501a478e212397883657a8a8be4db7a3 /xorg-server/include/misc.h
parent60adbfdea1ee754341d64454274e7aa83bae8971 (diff)
downloadvcxsrv-f7025b4baa1ba35ee796785641f04eac5bedb0a6.tar.gz
vcxsrv-f7025b4baa1ba35ee796785641f04eac5bedb0a6.tar.bz2
vcxsrv-f7025b4baa1ba35ee796785641f04eac5bedb0a6.zip
mkfontscale pixman xserver xtrans libX11 libXdmcp libxcb libXmu mesa git update 5 oct 2011
Diffstat (limited to 'xorg-server/include/misc.h')
-rw-r--r--xorg-server/include/misc.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/xorg-server/include/misc.h b/xorg-server/include/misc.h
index 1fea73ec3..dc039113d 100644
--- a/xorg-server/include/misc.h
+++ b/xorg-server/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];