int-l64.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /*
  2. * asm-generic/int-l64.h
  3. *
  4. * Integer declarations for architectures which use "long"
  5. * for 64-bit types.
  6. */
  7. #ifndef _ASM_GENERIC_INT_L64_H
  8. #define _ASM_GENERIC_INT_L64_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. typedef __signed__ long __s64;
  22. typedef unsigned long __u64;
  23. #endif /* __ASSEMBLY__ */
  24. #ifdef __KERNEL__
  25. #ifndef __ASSEMBLY__
  26. typedef signed char s8;
  27. typedef unsigned char u8;
  28. typedef signed short s16;
  29. typedef unsigned short u16;
  30. typedef signed int s32;
  31. typedef unsigned int u32;
  32. typedef signed long s64;
  33. typedef unsigned long u64;
  34. #define S8_C(x) x
  35. #define U8_C(x) x ## U
  36. #define S16_C(x) x
  37. #define U16_C(x) x ## U
  38. #define S32_C(x) x
  39. #define U32_C(x) x ## U
  40. #define S64_C(x) x ## L
  41. #define U64_C(x) x ## UL
  42. #else /* __ASSEMBLY__ */
  43. #define S8_C(x) x
  44. #define U8_C(x) x
  45. #define S16_C(x) x
  46. #define U16_C(x) x
  47. #define S32_C(x) x
  48. #define U32_C(x) x
  49. #define S64_C(x) x
  50. #define U64_C(x) x
  51. #endif /* __ASSEMBLY__ */
  52. #endif /* __KERNEL__ */
  53. #endif /* _ASM_GENERIC_INT_L64_H */