|
|
7100e8 |
commit 6080e33737a133d080eb0f86a7b66f3af04f4c91
|
|
|
7100e8 |
Author: Andrew Beekhof <andrew@beekhof.net>
|
|
|
7100e8 |
Date: Mon Feb 3 14:59:18 2014 +1100
|
|
|
7100e8 |
|
|
|
7100e8 |
Fix: Portability: Use basic types for DBus compatability struct
|
|
|
7100e8 |
|
|
|
7100e8 |
(cherry picked from commit 73a40012cc03336fb9753bc6e47bace7bc44a794)
|
|
|
7100e8 |
|
|
|
7100e8 |
diff --git a/include/portability.h b/include/portability.h
|
|
|
7100e8 |
index 29d1177..4eb6eaa 100644
|
|
|
7100e8 |
--- a/include/portability.h
|
|
|
7100e8 |
+++ b/include/portability.h
|
|
|
7100e8 |
@@ -178,6 +178,7 @@ g_list_free_full(GList * list, GDestroyNotify free_func)
|
|
|
7100e8 |
# endif
|
|
|
7100e8 |
|
|
|
7100e8 |
# ifndef HAVE_DBUSBASICVALUE
|
|
|
7100e8 |
+# include <stdint.h>
|
|
|
7100e8 |
# include <dbus/dbus.h>
|
|
|
7100e8 |
/**
|
|
|
7100e8 |
* An 8-byte struct you could use to access int64 without having
|
|
|
7100e8 |
@@ -185,8 +186,8 @@ g_list_free_full(GList * list, GDestroyNotify free_func)
|
|
|
7100e8 |
*/
|
|
|
7100e8 |
typedef struct
|
|
|
7100e8 |
{
|
|
|
7100e8 |
- dbus_uint32_t first32; /**< first 32 bits in the 8 bytes (beware endian issues) */
|
|
|
7100e8 |
- dbus_uint32_t second32; /**< second 32 bits in the 8 bytes (beware endian issues) */
|
|
|
7100e8 |
+ uint32_t first32; /**< first 32 bits in the 8 bytes (beware endian issues) */
|
|
|
7100e8 |
+ uint32_t second32; /**< second 32 bits in the 8 bytes (beware endian issues) */
|
|
|
7100e8 |
} DBus8ByteStruct;
|
|
|
7100e8 |
|
|
|
7100e8 |
/**
|
|
|
7100e8 |
@@ -202,14 +203,14 @@ typedef struct
|
|
|
7100e8 |
typedef union
|
|
|
7100e8 |
{
|
|
|
7100e8 |
unsigned char bytes[8]; /**< as 8 individual bytes */
|
|
|
7100e8 |
- dbus_int16_t i16; /**< as int16 */
|
|
|
7100e8 |
- dbus_uint16_t u16; /**< as int16 */
|
|
|
7100e8 |
- dbus_int32_t i32; /**< as int32 */
|
|
|
7100e8 |
- dbus_uint32_t u32; /**< as int32 */
|
|
|
7100e8 |
- dbus_bool_t bool_val; /**< as boolean */
|
|
|
7100e8 |
+ int16_t i16; /**< as int16 */
|
|
|
7100e8 |
+ uint16_t u16; /**< as int16 */
|
|
|
7100e8 |
+ int32_t i32; /**< as int32 */
|
|
|
7100e8 |
+ uint32_t u32; /**< as int32 */
|
|
|
7100e8 |
+ uint32_t bool_val; /**< as boolean */
|
|
|
7100e8 |
# ifdef DBUS_HAVE_INT64
|
|
|
7100e8 |
- dbus_int64_t i64; /**< as int64 */
|
|
|
7100e8 |
- dbus_uint64_t u64; /**< as int64 */
|
|
|
7100e8 |
+ int64_t i64; /**< as int64 */
|
|
|
7100e8 |
+ uint64_t u64; /**< as int64 */
|
|
|
7100e8 |
# endif
|
|
|
7100e8 |
DBus8ByteStruct eight; /**< as 8-byte struct */
|
|
|
7100e8 |
double dbl; /**< as double */
|