Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

243 lines
5.4 KiB

  1. /* yvals.h values header for Microsoft C/C++ */
  2. #pragma once
  3. #ifndef _YVALS
  4. #define _YVALS
  5. #define _CPPLIB_VER 310
  6. /* NAMING PROPERTIES */
  7. #define _WIN32_C_LIB 1
  8. /* THREAD AND LOCALE CONTROL */
  9. #define _MULTI_THREAD _MT /* nontrivial locks if multithreaded */
  10. #define _GLOBAL_LOCALE 0 /* 0 for per-thread locales, 1 for shared */
  11. /* THREAD-LOCAL STORAGE */
  12. #define _COMPILER_TLS 1 /* 1 if compiler supports TLS directly */
  13. #if _MULTI_THREAD
  14. #define _TLS_QUAL __declspec(thread) /* TLS qualifier, if any */
  15. #else
  16. #define _TLS_QUAL
  17. #endif
  18. #ifndef _HAS_EXCEPTIONS
  19. #define _HAS_EXCEPTIONS 1 /* predefine as 0 to disable exceptions */
  20. #endif
  21. #define _HAS_TEMPLATE_PARTIAL_ORDERING 0
  22. #define _HAS_PARTIAL_SPECIALIZATION (1301 <= _MSC_VER)
  23. #include <use_ansi.h>
  24. #ifndef _VC6SP2
  25. #define _VC6SP2 0 /* define as 1 to fix linker errors with V6.0 SP2 */
  26. #endif
  27. /* Define _CRTIMP2 */
  28. #ifndef _CRTIMP2
  29. #ifdef CRTDLL2
  30. #define _CRTIMP2 __declspec(dllexport)
  31. #else /* ndef CRTDLL2 */
  32. #if defined(_DLL) && !defined(_STATIC_CPPLIB)
  33. #define _CRTIMP2 __declspec(dllimport)
  34. #else /* ndef _DLL && !STATIC_CPPLIB */
  35. #define _CRTIMP2
  36. #endif /* _DLL && !STATIC_CPPLIB */
  37. #endif /* CRTDLL2 */
  38. #endif /* _CRTIMP2 */
  39. #ifndef _INTERNAL_IFSTRIP_
  40. /* These functions are for enabling STATIC_CPPLIB functionality */
  41. #define _cpp_stdin (&(__iob_func())[0])
  42. #define _cpp_stdout (&(__iob_func())[1])
  43. #define _cpp_stderr (&(__iob_func())[2])
  44. #define _cpp_isleadbyte(c) (__pctype_func()[(unsigned char)(c)] & _LEADBYTE)
  45. #endif
  46. #if defined(_DLL) && !defined(_STATIC_CPPLIB)
  47. #define _DLL_CPPLIB
  48. #endif
  49. #ifndef _INTERNAL_IFSTRIP_
  50. /* Define _CRTBLD_NATIVE_WCHAR_T */
  51. #if defined(_CRTBLD) && defined(__cplusplus)
  52. #ifndef _NATIVE_WCHAR_T_DEFINED
  53. #error Native wchar_t must be defined
  54. #else
  55. #define _CRTBLD_NATIVE_WCHAR_T
  56. #endif /* _NATIVE_WCHAR_T_DEFINED */
  57. #endif /* defined(_CRTBLD) && defined(__cplusplus) */
  58. #endif
  59. #if (1300 <= _MSC_VER)
  60. #define _DEPRECATED __declspec(deprecated)
  61. #else
  62. #define _DEPRECATED
  63. #endif
  64. /* NAMESPACE */
  65. #if defined(__cplusplus)
  66. #define _STD std::
  67. #define _STD_BEGIN namespace std {
  68. #define _STD_END }
  69. #define _CSTD ::
  70. #define _C_STD_BEGIN /* match _STD_BEGIN/END if *.c compiled as C++ */
  71. #define _C_STD_END
  72. #define _C_LIB_DECL extern "C" { /* C has extern "C" linkage */
  73. #define _END_C_LIB_DECL }
  74. #define _EXTERN_C extern "C" {
  75. #define _END_EXTERN_C }
  76. #else /* __cplusplus */
  77. #define _STD
  78. #define _STD_BEGIN
  79. #define _STD_END
  80. #define _CSTD
  81. #define _C_STD_BEGIN
  82. #define _C_STD_END
  83. #define _C_LIB_DECL
  84. #define _END_C_LIB_DECL
  85. #define _EXTERN_C
  86. #define _END_EXTERN_C
  87. #endif /* __cplusplus */
  88. #define _Restrict restrict
  89. #ifdef __cplusplus
  90. _STD_BEGIN
  91. typedef bool _Bool;
  92. _STD_END
  93. #endif /* __cplusplus */
  94. /* VC++ COMPILER PARAMETERS */
  95. #define _LONGLONG __int64
  96. #define _ULONGLONG unsigned __int64
  97. #define _LLONG_MAX 0x7fffffffffffffff
  98. #define _ULLONG_MAX 0xffffffffffffffff
  99. /* INTEGER PROPERTIES */
  100. #define _C2 1 /* 0 if not 2's complement */
  101. #define _MAX_EXP_DIG 8 /* for parsing numerics */
  102. #define _MAX_INT_DIG 32
  103. #define _MAX_SIG_DIG 36
  104. typedef _LONGLONG _Longlong;
  105. typedef _ULONGLONG _ULonglong;
  106. /* STDIO PROPERTIES */
  107. #define _Filet _iobuf
  108. #ifndef _FPOS_T_DEFINED
  109. #define _FPOSOFF(fp) ((long)(fp))
  110. #endif /* _FPOS_T_DEFINED */
  111. #define _IOBASE _base
  112. #define _IOPTR _ptr
  113. #define _IOCNT _cnt
  114. /* MULTITHREAD PROPERTIES */
  115. /* LOCK MACROS */
  116. #define _LOCK_LOCALE 0
  117. #define _LOCK_MALLOC 1
  118. #define _LOCK_STREAM 2
  119. #define _MAX_LOCK 3 /* one more than highest lock number */
  120. #ifdef __cplusplus
  121. _STD_BEGIN
  122. // CLASS _Lockit
  123. class _CRTIMP2 _Lockit
  124. { // lock while object in existence -- MUST NEST
  125. public:
  126. #if _MULTI_THREAD
  127. explicit _Lockit(); // set default lock
  128. explicit _Lockit(int); // set the lock
  129. ~_Lockit(); // clear the lock
  130. private:
  131. _Lockit(const _Lockit&); // not defined
  132. _Lockit& operator=(const _Lockit&); // not defined
  133. int _Locktype;
  134. #else /* _MULTI_THREAD */
  135. #define _LOCKIT(x)
  136. explicit _Lockit()
  137. { // do nothing
  138. }
  139. explicit _Lockit(int)
  140. { // do nothing
  141. }
  142. ~_Lockit()
  143. { // do nothing
  144. }
  145. #endif /* _MULTI_THREAD */
  146. };
  147. class _CRTIMP2 _Mutex
  148. { // lock under program control
  149. public:
  150. #if _MULTI_THREAD
  151. _Mutex();
  152. ~_Mutex();
  153. void _Lock();
  154. void _Unlock();
  155. private:
  156. _Mutex(const _Mutex&); // not defined
  157. _Mutex& operator=(const _Mutex&); // not defined
  158. void *_Mtx;
  159. #else /* _MULTI_THREAD */
  160. void _Lock()
  161. { // do nothing
  162. }
  163. void _Unlock()
  164. { // do nothing
  165. }
  166. #endif /* _MULTI_THREAD */
  167. };
  168. class _Init_locks
  169. { // initialize mutexes
  170. public:
  171. #if _MULTI_THREAD
  172. _Init_locks();
  173. ~_Init_locks();
  174. #else /* _MULTI_THREAD */
  175. _Init_locks()
  176. { // do nothing
  177. }
  178. ~_Init_locks()
  179. { // do nothing
  180. }
  181. #endif /* _MULTI_THREAD */
  182. };
  183. _STD_END
  184. #endif /* __cplusplus */
  185. /* MISCELLANEOUS MACROS AND TYPES */
  186. _C_STD_BEGIN
  187. _EXTERN_C
  188. _CRTIMP2 void __cdecl _Atexit(void (__cdecl *)(void));
  189. _END_EXTERN_C
  190. typedef int _Mbstatet;
  191. #define _ATEXIT_T void
  192. #define _Mbstinit(x) mbstate_t x = {0}
  193. _C_STD_END
  194. #endif /* _YVALS */
  195. /*
  196. * Copyright (c) 1992-2001 by P.J. Plauger. ALL RIGHTS RESERVED.
  197. * Consult your license regarding permissions and restrictions.
  198. V3.10:0009 */