u.h 984 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #define nil ((void*)0)
  2. typedef unsigned short ushort;
  3. typedef unsigned char uchar;
  4. typedef unsigned long ulong;
  5. typedef unsigned int uint;
  6. typedef signed char schar;
  7. typedef long long vlong;
  8. typedef unsigned long long uvlong;
  9. typedef ushort Rune;
  10. typedef union FPdbleword FPdbleword;
  11. typedef long jmp_buf[2];
  12. #define JMPBUFSP 0
  13. #define JMPBUFPC 1
  14. #define JMPBUFDPC 0
  15. typedef unsigned int mpdigit; /* for /sys/include/mp.h */
  16. typedef unsigned char u8int;
  17. typedef unsigned short u16int;
  18. typedef unsigned int u32int;
  19. typedef unsigned long long u64int;
  20. union FPdbleword
  21. {
  22. double x;
  23. struct { /* big endian */
  24. ulong hi;
  25. ulong lo;
  26. };
  27. };
  28. typedef char* va_list;
  29. #define va_start(list, start) list =\
  30. (sizeof(start) < 4?\
  31. (char*)((int*)&(start)+1):\
  32. (char*)(&(start)+1))
  33. #define va_end(list)\
  34. USED(list)
  35. #define va_arg(list, mode)\
  36. ((sizeof(mode) == 1)?\
  37. ((mode*)(list += 4))[-1]:\
  38. (sizeof(mode) == 2)?\
  39. ((mode*)(list += 4))[-1]:\
  40. ((mode*)(list += sizeof(mode)))[-1])