int-ll64.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /*
  2. * asm-generic/int-ll64.h
  3. *
  4. * Integer declarations for architectures which use "long long"
  5. * for 64-bit types.
  6. */
  7. #ifndef _ASM_GENERIC_INT_LL64_H
  8. #define _ASM_GENERIC_INT_LL64_H
  9. #include <asm/bitsperlong.h>
  10. #ifndef __ASSEMBLY__
  11. /*
  12. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  13. * header files exported to user space
  14. */
  15. typedef __signed__ char __s8;
  16. typedef unsigned char __u8;
  17. typedef __signed__ short __s16;
  18. typedef unsigned short __u16;
  19. typedef __signed__ int __s32;
  20. typedef unsigned int __u32;
  21. #ifdef __GNUC__
  22. __extension__ typedef __signed__ long long __s64;
  23. __extension__ typedef unsigned long long __u64;
  24. #else
  25. typedef __signed__ long long __s64;
  26. typedef unsigned long long __u64;
  27. #endif
  28. #endif /* __ASSEMBLY__ */
  29. #ifdef __KERNEL__
  30. #ifndef __ASSEMBLY__
  31. typedef signed char s8;
  32. typedef unsigned char u8;
  33. typedef signed short s16;
  34. typedef unsigned short u16;
  35. typedef signed int s32;
  36. typedef unsigned int u32;
  37. typedef signed long long s64;
  38. typedef unsigned long long u64;
  39. #define S8_C(x) x
  40. #define U8_C(x) x ## U
  41. #define S16_C(x) x
  42. #define U16_C(x) x ## U
  43. #define S32_C(x) x
  44. #define U32_C(x) x ## U
  45. #define S64_C(x) x ## LL
  46. #define U64_C(x) x ## ULL
  47. #else /* __ASSEMBLY__ */
  48. #define S8_C(x) x
  49. #define U8_C(x) x
  50. #define S16_C(x) x
  51. #define U16_C(x) x
  52. #define S32_C(x) x
  53. #define U32_C(x) x
  54. #define S64_C(x) x
  55. #define U64_C(x) x
  56. #endif /* __ASSEMBLY__ */
  57. #endif /* __KERNEL__ */
  58. #endif /* _ASM_GENERIC_INT_LL64_H */