BaseTypes.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. #ifndef __BASETYPES_H
  2. #define __BASETYPES_H
  3. #ifndef IN
  4. #define IN
  5. #endif
  6. #ifndef OUT
  7. #define OUT
  8. #endif
  9. #ifndef INOUT
  10. #define INOUT
  11. #endif
  12. #ifndef OPTIONAL
  13. #define OPTIONAL
  14. #endif
  15. #ifndef TRUE
  16. #define TRUE (1)
  17. #endif
  18. #ifndef FALSE
  19. #define FALSE (0)
  20. #endif
  21. #if defined(WIN32) || defined(WINDOWS)
  22. #define SCHED_OTHER (0)
  23. #define SCHED_FIFO (1)
  24. #define SCHED_RR (2)
  25. #ifndef SDKAPI
  26. #define SDKAPI __declspec(dllexport)
  27. #define SO_PREFIX ""
  28. #define SO_SUFFIX ".dll"
  29. #endif
  30. #ifdef EXPORT_COMMON
  31. #define DECLDLL __declspec(dllexport)
  32. #else
  33. #define DECLDLL
  34. #endif
  35. #ifndef CALLBACK
  36. #define CALLBACK __stdcall
  37. #endif
  38. #elif defined(LINUX)
  39. #ifndef SDKAPI
  40. #define SDKAPI
  41. #define SO_PREFIX "lib"
  42. #define SO_SUFFIX ".so"
  43. #endif
  44. #define DECLDLL
  45. #ifndef CALLBACK
  46. #define CALLBACK
  47. #endif
  48. #endif
  49. #define NUMBERICS "0123456789"
  50. #define INVALID_VALUE16 ((TZ_Uint16)-1)
  51. #define INVALID_VALUE32 ((TZ_Uint32)-1)
  52. #define INVALID_VALUE64 ((TZ_Uint64)-1)
  53. #define INVALID_HANDLE ((TZ_ULONG)-1)
  54. #define INVALID_DLLHD (0)
  55. #define MAX_INTEGER_16 INVALID_VALUE16
  56. #define MAX_INTEGER_32 INVALID_VALUE32
  57. #define MAX_INTEGER_64 INVALID_VALUE64
  58. typedef int TZ_BOOL;
  59. typedef unsigned char TZ_BYTE;
  60. typedef unsigned char TZ_UCHAR;
  61. typedef char TZ_CHAR;
  62. typedef signed char TZ_SCHAR;
  63. typedef unsigned short TZ_USHORT;
  64. typedef short TZ_SHORT;
  65. typedef signed short TZ_SSHORT;
  66. typedef unsigned int TZ_UINT;
  67. typedef int TZ_INT;
  68. typedef signed int TZ_SINT;
  69. typedef unsigned long TZ_ULONG;
  70. typedef long TZ_LONG;
  71. typedef signed long TZ_SLONG;
  72. typedef unsigned long long TZ_ULONGLONG;
  73. typedef long long TZ_LONGLONG;
  74. typedef signed long long TZ_SLONGLONG;
  75. typedef unsigned char TZ_Uint8;
  76. typedef char TZ_Int8;
  77. typedef signed char TZ_Sint8;
  78. typedef unsigned short TZ_Uint16;
  79. typedef short TZ_Int16;
  80. typedef signed short TZ_Sint16;
  81. typedef unsigned int TZ_Uint32;
  82. typedef int TZ_Int32;
  83. typedef signed int TZ_Sint32;
  84. typedef unsigned long long TZ_Uint64;
  85. typedef long long TZ_Int64;
  86. typedef float TZ_FLOAT;
  87. typedef double TZ_DOUBLE;
  88. typedef void * TZ_PVOID;
  89. typedef void * TZ_DLLHD;
  90. typedef unsigned long TZ_HANDLE;
  91. typedef unsigned long long TZ_HANDLE64;
  92. #endif /* ----- #ifndef __BASETYPES_H ----- */