mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-26 22:50:08 +01:00
shared: add typedefs for integers for different endianness
Kernel uses such typedefs (__le32) and systemd too (le32_t). As we don't want to rely on systemd headers in our code base, let's also define them. They have of course very little effect beside making it clearer to the reviewer that a certain variable is not supposed to be in native endianness.
This commit is contained in:
parent
b019950eaf
commit
f74b7718b3
1 changed files with 17 additions and 0 deletions
|
|
@ -44,6 +44,23 @@
|
|||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef __CHECKER__
|
||||
#define _nm_bitwise __attribute__((__bitwise__))
|
||||
#define _nm_force __attribute__((__force__))
|
||||
#else
|
||||
#define _nm_bitwise
|
||||
#define _nm_force
|
||||
#endif
|
||||
|
||||
typedef uint16_t _nm_bitwise nm_le16_t;
|
||||
typedef uint16_t _nm_bitwise nm_be16_t;
|
||||
typedef uint32_t _nm_bitwise nm_le32_t;
|
||||
typedef uint32_t _nm_bitwise nm_be32_t;
|
||||
typedef uint64_t _nm_bitwise nm_le64_t;
|
||||
typedef uint64_t _nm_bitwise nm_be64_t;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifdef thread_local
|
||||
#define _nm_thread_local thread_local
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue