3e167d6faa
The (de)marshalling generation code is fixed upstream so this patch will no longer be needed after the next release.
70 lines
3.9 KiB
Diff
70 lines
3.9 KiB
Diff
From 0649b10ed5839e407984a7118c69ca8379b4a0e4 Mon Sep 17 00:00:00 2001
|
|
From: Christophe Fergeau <cfergeau@redhat.com>
|
|
Date: Fri, 6 Apr 2012 15:17:43 +0200
|
|
Subject: [PATCH] Fix read_uint* macros on big-endian archs
|
|
|
|
---
|
|
gtk/generated_demarshallers.c | 12 ++++++------
|
|
gtk/generated_demarshallers1.c | 12 ++++++------
|
|
2 files changed, 12 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/gtk/generated_demarshallers.c b/gtk/generated_demarshallers.c
|
|
index f34dc12..6d67551 100644
|
|
--- a/gtk/generated_demarshallers.c
|
|
+++ b/gtk/generated_demarshallers.c
|
|
@@ -18,17 +18,17 @@
|
|
#define write_int8(ptr, val) *(int8_t *)(ptr) = val
|
|
#define read_uint8(ptr) (*((uint8_t *)(ptr)))
|
|
#define write_uint8(ptr, val) *(uint8_t *)(ptr) = val
|
|
-#define read_int16(ptr) ((int16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr)))
|
|
+#define read_int16(ptr) ((int16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr))))
|
|
#define write_int16(ptr, val) *(uint16_t *)(ptr) = SPICE_BYTESWAP16((uint16_t)val)
|
|
-#define read_uint16(ptr) ((uint16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr)))
|
|
+#define read_uint16(ptr) ((uint16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr))))
|
|
#define write_uint16(ptr, val) *(uint16_t *)(ptr) = SPICE_BYTESWAP16((uint16_t)val)
|
|
-#define read_int32(ptr) ((int32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr)))
|
|
+#define read_int32(ptr) ((int32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr))))
|
|
#define write_int32(ptr, val) *(uint32_t *)(ptr) = SPICE_BYTESWAP32((uint32_t)val)
|
|
-#define read_uint32(ptr) ((uint32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr)))
|
|
+#define read_uint32(ptr) ((uint32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr))))
|
|
#define write_uint32(ptr, val) *(uint32_t *)(ptr) = SPICE_BYTESWAP32((uint32_t)val)
|
|
-#define read_int64(ptr) ((int64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr)))
|
|
+#define read_int64(ptr) ((int64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr))))
|
|
#define write_int64(ptr, val) *(uint64_t *)(ptr) = SPICE_BYTESWAP64((uint64_t)val)
|
|
-#define read_uint64(ptr) ((uint64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr)))
|
|
+#define read_uint64(ptr) ((uint64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr))))
|
|
#define write_uint64(ptr, val) *(uint64_t *)(ptr) = SPICE_BYTESWAP64((uint64_t)val)
|
|
#else
|
|
#define read_int8(ptr) (*((int8_t *)(ptr)))
|
|
diff --git a/gtk/generated_demarshallers1.c b/gtk/generated_demarshallers1.c
|
|
index 633044c..5364769 100644
|
|
--- a/gtk/generated_demarshallers1.c
|
|
+++ b/gtk/generated_demarshallers1.c
|
|
@@ -18,17 +18,17 @@
|
|
#define write_int8(ptr, val) *(int8_t *)(ptr) = val
|
|
#define read_uint8(ptr) (*((uint8_t *)(ptr)))
|
|
#define write_uint8(ptr, val) *(uint8_t *)(ptr) = val
|
|
-#define read_int16(ptr) ((int16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr)))
|
|
+#define read_int16(ptr) ((int16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr))))
|
|
#define write_int16(ptr, val) *(uint16_t *)(ptr) = SPICE_BYTESWAP16((uint16_t)val)
|
|
-#define read_uint16(ptr) ((uint16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr)))
|
|
+#define read_uint16(ptr) ((uint16_t)SPICE_BYTESWAP16(*((uint16_t *)(ptr))))
|
|
#define write_uint16(ptr, val) *(uint16_t *)(ptr) = SPICE_BYTESWAP16((uint16_t)val)
|
|
-#define read_int32(ptr) ((int32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr)))
|
|
+#define read_int32(ptr) ((int32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr))))
|
|
#define write_int32(ptr, val) *(uint32_t *)(ptr) = SPICE_BYTESWAP32((uint32_t)val)
|
|
-#define read_uint32(ptr) ((uint32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr)))
|
|
+#define read_uint32(ptr) ((uint32_t)SPICE_BYTESWAP32(*((uint32_t *)(ptr))))
|
|
#define write_uint32(ptr, val) *(uint32_t *)(ptr) = SPICE_BYTESWAP32((uint32_t)val)
|
|
-#define read_int64(ptr) ((int64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr)))
|
|
+#define read_int64(ptr) ((int64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr))))
|
|
#define write_int64(ptr, val) *(uint64_t *)(ptr) = SPICE_BYTESWAP64((uint64_t)val)
|
|
-#define read_uint64(ptr) ((uint64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr)))
|
|
+#define read_uint64(ptr) ((uint64_t)SPICE_BYTESWAP64(*((uint64_t *)(ptr))))
|
|
#define write_uint64(ptr, val) *(uint64_t *)(ptr) = SPICE_BYTESWAP64((uint64_t)val)
|
|
#else
|
|
#define read_int8(ptr) (*((int8_t *)(ptr)))
|
|
--
|
|
1.7.9.3
|
|
|