|
|
@@ -96,6 +96,9 @@
|
|
|
#ifndef __PACKED_STRUCT
|
|
|
#define __PACKED_STRUCT __packed struct
|
|
|
#endif
|
|
|
+ #ifndef __PACKED_UNION
|
|
|
+ #define __PACKED_UNION __packed union
|
|
|
+ #endif
|
|
|
#ifndef __UNALIGNED_UINT32 /* deprecated */
|
|
|
__packed struct T_UINT32 { uint32_t v; };
|
|
|
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
|
|
|
@@ -174,6 +177,9 @@
|
|
|
#ifndef __PACKED_STRUCT
|
|
|
#define __PACKED_STRUCT struct __attribute__((packed))
|
|
|
#endif
|
|
|
+ #ifndef __PACKED_UNION
|
|
|
+ #define __PACKED_UNION union __attribute__((packed))
|
|
|
+ #endif
|
|
|
#ifndef __UNALIGNED_UINT32 /* deprecated */
|
|
|
struct __attribute__((packed)) T_UINT32 { uint32_t v; };
|
|
|
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
|
|
|
@@ -233,6 +239,9 @@
|
|
|
#ifndef __PACKED_STRUCT
|
|
|
#define __PACKED_STRUCT struct __packed__
|
|
|
#endif
|
|
|
+ #ifndef __PACKED_UNION
|
|
|
+ #define __PACKED_UNION union __packed__
|
|
|
+ #endif
|
|
|
#ifndef __UNALIGNED_UINT32 /* deprecated */
|
|
|
struct __packed__ T_UINT32 { uint32_t v; };
|
|
|
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
|
|
|
@@ -290,6 +299,9 @@
|
|
|
#ifndef __PACKED_STRUCT
|
|
|
#define __PACKED_STRUCT @packed struct
|
|
|
#endif
|
|
|
+ #ifndef __PACKED_UNION
|
|
|
+ #define __PACKED_UNION @packed union
|
|
|
+ #endif
|
|
|
#ifndef __UNALIGNED_UINT32 /* deprecated */
|
|
|
@packed struct T_UINT32 { uint32_t v; };
|
|
|
#define __UNALIGNED_UINT32(x) (((struct T_UINT32 *)(x))->v)
|