types.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /* $Id: types.h,v 1.3 1999/08/18 23:37:50 ralf Exp $
  2. *
  3. * This file is subject to the terms and conditions of the GNU General Public
  4. * License. See the file "COPYING" in the main directory of this archive
  5. * for more details.
  6. *
  7. * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
  8. * Copyright (C) 1999 Silicon Graphics, Inc.
  9. */
  10. #ifndef _ASM_TYPES_H
  11. #define _ASM_TYPES_H
  12. typedef unsigned short umode_t;
  13. /*
  14. * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
  15. * header files exported to user space
  16. */
  17. typedef __signed__ char __s8;
  18. typedef unsigned char __u8;
  19. typedef __signed__ short __s16;
  20. typedef unsigned short __u16;
  21. typedef __signed__ int __s32;
  22. typedef unsigned int __u32;
  23. #if (_MIPS_SZLONG == 64)
  24. typedef __signed__ long __s64;
  25. typedef unsigned long __u64;
  26. #else
  27. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  28. typedef __signed__ long long __s64;
  29. typedef unsigned long long __u64;
  30. #endif
  31. #endif
  32. /*
  33. * These aren't exported outside the kernel to avoid name space clashes
  34. */
  35. #ifdef __KERNEL__
  36. typedef __signed char s8;
  37. typedef unsigned char u8;
  38. typedef __signed short s16;
  39. typedef unsigned short u16;
  40. typedef __signed int s32;
  41. typedef unsigned int u32;
  42. #if (_MIPS_SZLONG == 64)
  43. typedef __signed__ long s64;
  44. typedef unsigned long u64;
  45. #else
  46. #if defined(__GNUC__) && !defined(__STRICT_ANSI__)
  47. typedef __signed__ long long s64;
  48. typedef unsigned long long u64;
  49. #endif
  50. #endif
  51. #define BITS_PER_LONG _MIPS_SZLONG
  52. typedef unsigned long dma_addr_t;
  53. #endif /* __KERNEL__ */
  54. #endif /* _ASM_TYPES_H */