bitsperlong.h 486 B

12345678910111213141516171819202122
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __ASM_GENERIC_BITS_PER_LONG
  3. #define __ASM_GENERIC_BITS_PER_LONG
  4. #include <uapi/asm-generic/bitsperlong.h>
  5. #ifdef __SIZEOF_LONG__
  6. #define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
  7. #else
  8. #define BITS_PER_LONG __WORDSIZE
  9. #endif
  10. #if BITS_PER_LONG != __BITS_PER_LONG
  11. #error Inconsistent word size. Check asm/bitsperlong.h
  12. #endif
  13. #ifndef BITS_PER_LONG_LONG
  14. #define BITS_PER_LONG_LONG 64
  15. #endif
  16. #endif /* __ASM_GENERIC_BITS_PER_LONG */