diff options
Diffstat (limited to 'src/nxt_clang.h')
-rw-r--r-- | src/nxt_clang.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/nxt_clang.h b/src/nxt_clang.h index 94638346..10ed6687 100644 --- a/src/nxt_clang.h +++ b/src/nxt_clang.h @@ -8,6 +8,9 @@ #define _NXT_CLANG_H_INCLUDED_ +#include <nxt_unit_cdefs.h> + + #define nxt_inline static inline __attribute__((always_inline)) #define nxt_noinline __attribute__((noinline)) #define nxt_cdecl @@ -210,24 +213,12 @@ nxt_popcount(unsigned int x) *(type *) ((u_char *) p + offset) -#define nxt_nitems(x) \ - (sizeof(x) / sizeof((x)[0])) - - /* GCC and Clang use __builtin_abs() instead of libc abs(). */ #define nxt_abs(val) \ abs(val) -#define nxt_max(val1, val2) \ - ((val1 < val2) ? (val2) : (val1)) - - -#define nxt_min(val1, val2) \ - ((val1 > val2) ? (val2) : (val1)) - - #define nxt_bswap32(val) \ ( ((val) >> 24) \ | (((val) & 0x00FF0000) >> 8) \ @@ -252,7 +243,7 @@ nxt_popcount(unsigned int x) #define nxt_length(s) \ - (sizeof(s) - 1) + (sizeof(s) - 1 + nxt_must_be_array(s)) #endif /* _NXT_CLANG_H_INCLUDED_ */ |