mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
undefine some macros which are already defined by macOS SDK
This commit is contained in:
parent
550a2cc2ce
commit
13a7805f42
1 changed files with 9 additions and 0 deletions
|
@ -89,6 +89,9 @@ extern pthread_t main_thread;
|
|||
#define CONCAT(x, y) CONCAT_DETAIL(x, y)
|
||||
#define UNIQUE(x) CONCAT(x, __COUNTER__)
|
||||
|
||||
#ifdef ALIGN
|
||||
#undef ALIGN
|
||||
#endif
|
||||
#define ALIGN(x, a) ALIGN_MASK(x, (uintptr_t) (a) - 1)
|
||||
#define ALIGN_MASK(x, m) (((uintptr_t) (x) + (m)) & ~(m))
|
||||
#define IS_ALIGNED(x, a) (ALIGN(x, a) == (uintptr_t) x)
|
||||
|
@ -113,11 +116,17 @@ extern pthread_t main_thread;
|
|||
#define ARRAY_LEN(a) ( sizeof (a) / sizeof (a)[0] )
|
||||
|
||||
/* Return the bigger value */
|
||||
#ifdef MAX
|
||||
#undef MAX
|
||||
#endif
|
||||
#define MAX(a, b) ({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a > _b ? _a : _b; })
|
||||
|
||||
/* Return the smaller value */
|
||||
#ifdef MIN
|
||||
#undef MIN
|
||||
#endif
|
||||
#define MIN(a, b) ({ __typeof__ (a) _a = (a); \
|
||||
__typeof__ (b) _b = (b); \
|
||||
_a < _b ? _a : _b; })
|
||||
|
|
Loading…
Add table
Reference in a new issue