sys: util: provide BITS_PER_LONG_LONG
BITS_PER_LONG_LONG to enable 64bit manipulation
@@ -44,13 +44,16 @@ extern "C" {
/** @brief Cast @p x, a signed integer, to a <tt>void*</tt>. */
#define INT_TO_POINTER(x) ((void *) (intptr_t) (x))
-#if !(defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__))
+#if !(defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__) && defined(__SIZEOF_LONG_LONG__))
# error Missing required predefined macros for BITS_PER_LONG calculation
#endif
/** Number of bits in a long int. */
#define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
+/** Number of bits in a long long int. */
+#define BITS_PER_LONG_LONG (__CHAR_BIT__ * __SIZEOF_LONG_LONG__)
+
/**
* @brief Create a contiguous bitmask starting at bit position @p l
* and ending at position @p h.
