types.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef _H8300_TYPES_H
  2. #define _H8300_TYPES_H
  3. #if !defined(__ASSEMBLY__)
  4. /*
  5. * This file is never included by application software unless
  6. * explicitly requested (e.g., via linux/types.h) in which case the
  7. * application is Linux specific so (user-) name space pollution is
  8. * not a major issue. However, for interoperability, libraries still
  9. * need to be careful to avoid a name clashes.
  10. */
  11. typedef unsigned short umode_t;
  12. /*
  13. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  14. * header files exported to user space
  15. */
  16. typedef __signed__ char __s8;
  17. typedef unsigned char __u8;
  18. typedef __signed__ short __s16;
  19. typedef unsigned short __u16;
  20. typedef __signed__ int __s32;
  21. typedef unsigned int __u32;
  22. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  23. typedef __signed__ long long __s64;
  24. typedef unsigned long long __u64;
  25. #endif
  26. /*
  27. * These aren't exported outside the kernel to avoid name space clashes
  28. */
  29. #ifdef __KERNEL__
  30. typedef signed char s8;
  31. typedef unsigned char u8;
  32. typedef signed short s16;
  33. typedef unsigned short u16;
  34. typedef signed int s32;
  35. typedef unsigned int u32;
  36. typedef signed long long s64;
  37. typedef unsigned long long u64;
  38. #define BITS_PER_LONG 32
  39. /* Dma addresses are 32-bits wide. */
  40. typedef u32 dma_addr_t;
  41. #define HAVE_SECTOR_T
  42. typedef u64 sector_t;
  43. #endif /* __KERNEL__ */
  44. #endif /* __ASSEMBLY__ */
  45. #endif /* _H8300_TYPES_H */