1 /***
2 *crtdefs.h - definitions/declarations common to all CRT
3 *
4 *           Copyright (c) Microsoft Corporation. All rights reserved.
5 *
6 *Purpose:
7 *           This file has mostly defines used by the entire CRT.
8 *
9 *           [Public]
10 *
11 ****/
12
13 /* Lack of pragma once is deliberate */
14
15 /* Define _CRTIMP */ 
16 #ifndef _CRTIMP
17 #ifdef  _DLL
18 #define _CRTIMP __declspec(dllimport)
19 #else     /* ndef _DLL */
20 #define _CRTIMP
21 #endif  /* _DLL */
22 #endif  /* _CRTIMP */
23
24 #ifndef _INC_CRTDEFS
25 #define _INC_CRTDEFS
26
27
28
29 #if defined(__midl)
30 /* MIDL does not want to see this stuff */
31 #undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 
32 #undef _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 
33 #undef _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 
34 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 0
35 #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 0
36 #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 0
37 #endif
38
39 #if        !defined(_WIN32)
40 #error ERROR: Only Win32 target supported!
41 #endif
42
43 /* Note on use of "deprecate":
44  * Various places in this header and other headers use __declspec(deprecate) or macros that have the term DEPRECATE in them.
45  * We use deprecate here ONLY to signal the compiler to emit a warning about these items. The use of deprecate
46  * should NOT be taken to imply that any standard committee has deprecated these functions from the relevant standards.
47  * In fact, these functions are NOT deprecated from the standard.
48  *
49  * Full details can be found in our documentation by searching for "Security Enhancements in the CRT".
50 */
51
52
53 #ifdef _CRT_NOFORCE_MANIFEST
54
55       #ifdef _CRT_FORCE_MANIFEST
56              #pragma message ("_CRT_FORCE_MANIFEST and _CRT_NOFORCE_MANIFEST defined. Define just one")
57              #pragma message ("_CRT_FORCE_MANIFEST ignored")
58       #endif
59
60 #else
61
62       #if !defined(_CRT_FORCE_MANIFEST) && defined(_VC_NODEFAULTLIB)
63              #define _CRT_NOFORCE_MANIFEST
64       #endif
65
66 #endif
67
68 #include <sal.h>
69
70 #ifdef _DLL
71
72 #if !defined(_CRT_NOFORCE_MANIFEST)
73
74 #ifdef _DEBUG
75 #ifdef _CRT_MANIFEST_RETAIL
76 #define _CRT_MANIFEST_INCONSISTENT
77 #else
78 #define _CRT_MANIFEST_DEBUG
79 #endif
80 #else
81 #ifdef _CRT_MANIFEST_DEBUG
82 #define _CRT_MANIFEST_INCONSISTENT
83 #else
84 #define _CRT_MANIFEST_RETAIL
85 #endif
86 #endif
87
88 #ifdef _CRT_MANIFEST_INCONSISTENT
89 #error You have included some C++/C library header files with _DEBUG defined and some with _DEBUG not defined. This will not work correctly. Please have _DEBUG set or clear consistently.
90 #endif
91
92 #include <crtassem.h>
93
94 #ifdef _M_IX86
95
96 #ifdef _DEBUG
97 #pragma comment(linker,"/manifestdependency:\"type='win32' "                    \
98              "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".DebugCRT' "               \
99              "version='" _CRT_ASSEMBLY_VERSION "' "                                           \
100              "processorArchitecture='x86' "                                                        \
101              "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
102 #else
103 #pragma comment(linker,"/manifestdependency:\"type='win32' "                    \
104              "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "                       \
105              "version='" _CRT_ASSEMBLY_VERSION "' "                                           \
106              "processorArchitecture='x86' "                                                        \
107              "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
108 #endif
109
110 #endif    /* _M_IX86 */
111
112 #ifdef _M_AMD64
113
114 #ifdef _DEBUG
115 #pragma comment(linker,"/manifestdependency:\"type='win32' "                    \
116              "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".DebugCRT' "               \
117              "version='" _CRT_ASSEMBLY_VERSION "' "                                           \
118              "processorArchitecture='amd64' "                                                     \
119              "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
120 #else
121 #pragma comment(linker,"/manifestdependency:\"type='win32' "                    \
122              "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "                       \
123              "version='" _CRT_ASSEMBLY_VERSION "' "                                           \
124              "processorArchitecture='amd64' "                                                     \
125              "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
126 #endif
127
128 #endif    /* _M_AMD64 */
129
130 #ifdef _M_IA64
131
132 #ifdef _DEBUG
133 #pragma comment(linker,"/manifestdependency:\"type='win32' "                    \
134              "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".DebugCRT' "               \
135              "version='" _CRT_ASSEMBLY_VERSION "' "                                           \
136              "processorArchitecture='ia64' "                                                       \
137              "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
138 #else
139 #pragma comment(linker,"/manifestdependency:\"type='win32' "                    \
140              "name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' "                       \
141              "version='" _CRT_ASSEMBLY_VERSION "' "                                           \
142              "processorArchitecture='ia64' "                                                       \
143              "publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"")
144 #endif
145
146 #endif    /* _M_IA64 */
147
148 #endif    /* !defined(_CRT_NOFORCE_MANIFEST) */
149
150 #endif    /* _DLL */
151
152 #ifdef  _MSC_VER
153 #undef _CRT_PACKING
154 #define _CRT_PACKING 8
155
156 #pragma pack(push,_CRT_PACKING)
157 #endif  /* _MSC_VER */
158
159 #include <vadefs.h>
160
161 #ifdef  __cplusplus
162 extern "C" {
163 #endif
164
165 /* preprocessor string helpers */
166 #ifndef _CRT_STRINGIZE
167 #define __CRT_STRINGIZE(_Value) #_Value
168 #define _CRT_STRINGIZE(_Value) __CRT_STRINGIZE(_Value)
169 #endif
170
171 #ifndef _CRT_WIDE
172 #define __CRT_WIDE(_String) L ## _String
173 #define _CRT_WIDE(_String) __CRT_WIDE(_String)
174 #endif
175
176 #ifndef _CRT_APPEND
177 #define __CRT_APPEND(_Value1, _Value2) _Value1 ## _Value2
178 #define _CRT_APPEND(_Value1, _Value2) __CRT_APPEND(_Value1, _Value2)
179 #endif
180
181 #if !defined(_W64)
182 #if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
183 #define _W64 __w64
184 #else
185 #define _W64
186 #endif
187 #endif
188
189
190 /* Define _CRTIMP_NOIA64 */
191 #ifndef _CRTIMP_NOIA64
192 #if defined(_M_IA64)
193 #define _CRTIMP_NOIA64
194 #else
195 #define _CRTIMP_NOIA64 _CRTIMP
196 #endif
197 #endif
198
199 /* Define _CRTIMP2 */
200
201 #ifndef _CRTIMP2
202 #if defined(_DLL) && !defined(_STATIC_CPPLIB)
203 #define _CRTIMP2 __declspec(dllimport)
204 #else     /* ndef _DLL && !STATIC_CPPLIB */
205 #define _CRTIMP2
206 #endif  /* _DLL && !STATIC_CPPLIB */
207 #endif  /* _CRTIMP2 */
208
209 /* Define _CRTIMP_ALTERNATIVE */
210
211 #ifndef _CRTIMP_ALTERNATIVE
212 #ifdef  _DLL
213 #ifdef _CRT_ALTERNATIVE_INLINES
214 #define _CRTIMP_ALTERNATIVE
215 #else
216 #define _CRTIMP_ALTERNATIVE _CRTIMP
217 #define _CRT_ALTERNATIVE_IMPORTED
218 #endif
219 #else     /* ndef _DLL */
220 #define _CRTIMP_ALTERNATIVE
221 #endif  /* _DLL */
222 #endif  /* _CRTIMP_ALTERNATIVE */
223
224 /* Define _MRTIMP */
225
226 #ifndef _MRTIMP
227 #define _MRTIMP __declspec(dllimport)
228 #endif  /* _MRTIMP */
229
230 /* Define _MRTIMP2 */
231 #ifndef _MRTIMP2
232
233 #if defined(_DLL) && !defined(_STATIC_CPPLIB)
234 #define _MRTIMP2    __declspec(dllimport)
235
236 #else     /* ndef _DLL && !STATIC_CPPLIB */
237 #define _MRTIMP2
238 #endif  /* _DLL && !STATIC_CPPLIB */
239
240 #endif  /* _MRTIMP2 */
241
242
243 #ifndef _MCRTIMP
244 #ifdef  _DLL
245 #define _MCRTIMP __declspec(dllimport)
246 #else     /* ndef _DLL */
247 #define _MCRTIMP
248 #endif  /* _DLL */
249 #endif  /* _CRTIMP */
250
251 #ifndef __CLR_OR_THIS_CALL
252 #if defined(MRTDLL) || defined(_M_CEE_PURE)
253 #define __CLR_OR_THIS_CALL  __clrcall
254 #else
255 #define __CLR_OR_THIS_CALL
256 #endif
257 #endif
258
259 #ifndef __CLRCALL_OR_CDECL
260 #if defined(MRTDLL) || defined(_M_CEE_PURE)
261 #define __CLRCALL_OR_CDECL __clrcall
262 #else
263 #define __CLRCALL_OR_CDECL __cdecl
264 #endif
265 #endif
266
267 #ifndef _CRTIMP_PURE
268  #if defined(_M_CEE_PURE) || defined(_STATIC_CPPLIB)
269   #define _CRTIMP_PURE
270  #else
271   #define _CRTIMP_PURE _CRTIMP
272  #endif
273 #endif
274
275 #ifndef _PGLOBAL
276 #ifdef _M_CEE
277   #if defined(__cplusplus_cli)
278       #define _PGLOBAL __declspec(process)
279   #else
280       #define _PGLOBAL
281   #endif
282 #else
283 #define _PGLOBAL
284 #endif
285 #endif
286
287 #ifndef _AGLOBAL
288 #ifdef _M_CEE
289 #define _AGLOBAL __declspec(appdomain)
290 #else
291 #define _AGLOBAL
292 #endif
293 #endif
294
295 /* define a specific constant for mixed mode */
296 #ifdef _M_CEE
297 #ifndef _M_CEE_PURE
298 #define _M_CEE_MIXED
299 #endif
300 #endif
301
302 /* Define __STDC_SECURE_LIB__ */
303 #define __STDC_SECURE_LIB__ 200411L
304
305 /* Retain__GOT_SECURE_LIB__ for back-compat */
306 #define __GOT_SECURE_LIB__ __STDC_SECURE_LIB__
307
308 /* Default value for __STDC_WANT_SECURE_LIB__ is 1 */
309 #ifndef __STDC_WANT_SECURE_LIB__
310 #define __STDC_WANT_SECURE_LIB__ 1
311 #endif
312
313 /* Turn off warnings if __STDC_WANT_SECURE_LIB__ is 0 */
314 #if !__STDC_WANT_SECURE_LIB__ && !defined(_CRT_SECURE_NO_WARNINGS)
315 #define _CRT_SECURE_NO_WARNINGS
316 #endif
317
318 /* See note on use of deprecate at the top of this file */
319 #if _MSC_FULL_VER >= 140050320
320 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated(_Text))
321 #else
322 #define _CRT_DEPRECATE_TEXT(_Text) __declspec(deprecated)
323 #endif
324
325 /* Define _CRT_INSECURE_DEPRECATE */
326 /* See note on use of deprecate at the top of this file */
327 #if defined(_CRT_SECURE_NO_DEPRECATE) && !defined(_CRT_SECURE_NO_WARNINGS)
328 #define _CRT_SECURE_NO_WARNINGS
329 #endif
330
331 #ifndef _CRT_INSECURE_DEPRECATE
332 #ifdef _CRT_SECURE_NO_WARNINGS
333 #define _CRT_INSECURE_DEPRECATE(_Replacement)
334 #else
335 #define _CRT_INSECURE_DEPRECATE(_Replacement) _CRT_DEPRECATE_TEXT("This function or variable may be unsafe. Consider using " #_Replacement " instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.")
336 #endif
337 #endif
338
339 /* Define _CRT_INSECURE_DEPRECATE_MEMORY */
340 /* See note on use of deprecate at the top of this file */
341 #if defined(_CRT_SECURE_DEPRECATE_MEMORY) && !defined(_CRT_SECURE_WARNINGS_MEMORY)
342 #define _CRT_SECURE_WARNINGS_MEMORY
343 #endif
344
345 #ifndef _CRT_INSECURE_DEPRECATE_MEMORY
346 #if !defined(_CRT_SECURE_WARNINGS_MEMORY)
347 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement)
348 #else
349 #define _CRT_INSECURE_DEPRECATE_MEMORY(_Replacement) _CRT_INSECURE_DEPRECATE(_Replacement)
350 #endif
351 #endif
352
353 /* Define _CRT_INSECURE_DEPRECATE_GLOBALS */
354 /* See note on use of deprecate at the top of this file */
355 #if !defined (RC_INVOKED)
356 #if defined(_CRT_SECURE_NO_DEPRECATE_GLOBALS) && !defined(_CRT_SECURE_NO_WARNINGS_GLOBALS)
357 #define _CRT_SECURE_NO_WARNINGS_GLOBALS
358 #endif
359 #endif
360
361 #ifndef _CRT_INSECURE_DEPRECATE_GLOBALS
362 #if defined (RC_INVOKED)
363 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
364 #else
365 #if defined(_CRT_SECURE_NO_WARNINGS_GLOBALS)
366 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement)
367 #else
368 #define _CRT_INSECURE_DEPRECATE_GLOBALS(_Replacement) _CRT_INSECURE_DEPRECATE(_Replacement)
369 #endif
370 #endif
371 #endif 
372
373 /* Define _CRT_MANAGED_HEAP_DEPRECATE */
374 /* See note on use of deprecate at the top of this file */
375 #if defined(_CRT_MANAGED_HEAP_NO_DEPRECATE) && !defined(_CRT_MANAGED_HEAP_NO_WARNINGS)
376 #define _CRT_MANAGED_HEAP_NO_WARNINGS
377 #endif
378
379 #ifndef _CRT_MANAGED_HEAP_DEPRECATE
380 #ifdef _CRT_MANAGED_HEAP_NO_WARNINGS
381 #define _CRT_MANAGED_HEAP_DEPRECATE
382 #else
383 #if defined(_M_CEE)
384 #define _CRT_MANAGED_HEAP_DEPRECATE 
385 /* Disabled to allow QA tests to get fixed 
386 _CRT_DEPRECATE_TEXT("Direct heap access is not safely possible from managed code.") 
387 */
388 #else
389 #define _CRT_MANAGED_HEAP_DEPRECATE
390 #endif
391 #endif
392 #endif
393
394 /* Change the __FILL_BUFFER_PATTERN to 0xFE to fix security function buffer overrun detection bug */
395 #define _SECURECRT_FILL_BUFFER_PATTERN 0xFE
396
397 /* obsolete stuff */
398
399 /* Define _CRT_OBSOLETE */
400 /* See note on use of deprecate at the top of this file */
401 #if defined(_CRT_OBSOLETE_NO_DEPRECATE) && !defined(_CRT_OBSOLETE_NO_WARNINGS)
402 #define _CRT_OBSOLETE_NO_WARNINGS
403 #endif
404
405 #ifndef _CRT_OBSOLETE
406 #ifdef _CRT_OBSOLETE_NO_WARNINGS
407 #define _CRT_OBSOLETE(_NewItem) 
408 #else
409 #define _CRT_OBSOLETE(_NewItem) _CRT_DEPRECATE_TEXT("This function or variable has been superceded by newer library or operating system functionality. Consider using " #_NewItem " instead. See online help for details.")
410 #endif
411 #endif
412
413
414 /* jit64 instrinsic stuff */
415 #ifndef _CRT_JIT_INTRINSIC
416 #if defined(_M_CEE) && (defined(_M_AMD64) || defined(_M_IA64))
417 /* This is only needed when managed code is calling the native APIs, targeting the 64-bit runtime */
418 #define _CRT_JIT_INTRINSIC __declspec(jitintrinsic)
419 #else
420 #define _CRT_JIT_INTRINSIC 
421 #endif
422 #endif
423
424 /* Define overload switches */
425 #if !defined (RC_INVOKED) 
426  #if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES)
427   #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES 0
428  #else
429   #if !__STDC_WANT_SECURE_LIB__ && _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES
430      #error Cannot use Secure CRT C++ overloads when __STDC_WANT_SECURE_LIB__ is 0
431   #endif
432  #endif
433 #endif
434
435 #if !defined (RC_INVOKED) 
436  #if !defined(_CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT)
437   /* _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT is ignored if _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES is set to 0 */
438   #define _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT 0
439  #else
440   #if !__STDC_WANT_SECURE_LIB__ && _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT
441      #error Cannot use Secure CRT C++ overloads when __STDC_WANT_SECURE_LIB__ is 0
442   #endif
443  #endif
444 #endif
445
446 #if !defined (RC_INVOKED) 
447  #if !defined(_CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES)
448   #if __STDC_WANT_SECURE_LIB__
449      #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 1
450   #else
451      #define _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES 0
452   #endif
453  #else
454   #if !__STDC_WANT_SECURE_LIB__ && _CRT_SECURE_CPP_OVERLOAD_SECURE_NAMES
455      #error Cannot use Secure CRT C++ overloads when __STDC_WANT_SECURE_LIB__ is 0
456   #endif
457  #endif
458 #endif
459
460 /* Define _CRT_NONSTDC_DEPRECATE */
461 /* See note on use of deprecate at the top of this file */
462 #if defined(_CRT_NONSTDC_NO_DEPRECATE) && !defined(_CRT_NONSTDC_NO_WARNINGS)
463 #define _CRT_NONSTDC_NO_WARNINGS
464 #endif
465
466 #if !defined(_CRT_NONSTDC_DEPRECATE)
467 #if defined(_CRT_NONSTDC_NO_WARNINGS) || defined(_POSIX_)
468 #define _CRT_NONSTDC_DEPRECATE(_NewName)
469 #else
470 #define _CRT_NONSTDC_DEPRECATE(_NewName) _CRT_DEPRECATE_TEXT("The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: " #_NewName ". See online help for details.")
471 #endif
472 #endif
473
474 #ifndef _SIZE_T_DEFINED
475 #ifdef  _WIN64
476 typedef unsigned __int64      size_t;
477 #else
478 typedef _W64 unsigned int     size_t;
479 #endif
480 #define _SIZE_T_DEFINED
481 #endif
482
483 #if __STDC_WANT_SECURE_LIB__
484 #ifndef _RSIZE_T_DEFINED
485 typedef size_t rsize_t;
486 #define _RSIZE_T_DEFINED
487 #endif
488 #endif
489
490 #ifndef _INTPTR_T_DEFINED
491 #ifdef  _WIN64
492 typedef __int64                     intptr_t;
493 #else
494 typedef _W64 int                    intptr_t;
495 #endif
496 #define _INTPTR_T_DEFINED
497 #endif
498
499 #ifndef _UINTPTR_T_DEFINED
500 #ifdef  _WIN64
501 typedef unsigned __int64      uintptr_t;
502 #else
503 typedef _W64 unsigned int     uintptr_t;
504 #endif
505 #define _UINTPTR_T_DEFINED
506 #endif
507
508 #ifndef _PTRDIFF_T_DEFINED
509 #ifdef  _WIN64
510 typedef __int64                     ptrdiff_t;
511 #else
512 typedef _W64 int                    ptrdiff_t;
513 #endif
514 #define _PTRDIFF_T_DEFINED
515 #endif
516
517 #ifndef _WCHAR_T_DEFINED
518 typedef unsigned short wchar_t;
519 #define _WCHAR_T_DEFINED
520 #endif
521
522 #ifndef _WCTYPE_T_DEFINED
523 typedef unsigned short wint_t;
524 typedef unsigned short wctype_t;
525 #define _WCTYPE_T_DEFINED
526 #endif
527
528 #ifndef _VA_LIST_DEFINED
529 #ifdef _M_CEE_PURE
530 typedef System::ArgIterator va_list;
531 #else
532 typedef char *  va_list;
533 #endif
534 #define _VA_LIST_DEFINED
535 #endif
536
537 #ifdef  _USE_32BIT_TIME_T
538 #ifdef  _WIN64
539 #error You cannot use 32-bit time_t (_USE_32BIT_TIME_T) with _WIN64
540 #undef  _USE_32BIT_TIME_T
541 #endif
542 #endif
543
544 #ifndef _ERRCODE_DEFINED
545 #define _ERRCODE_DEFINED
546 /* errcode is deprecated in favor or errno_t, which is part of the standard proposal */
547 #if !defined(__midl)
548 _CRT_DEPRECATE_TEXT("This name was supported during some Whidbey pre-releases. Instead, use the standard name errno_t." ) typedef int errcode;
549 #else
550 typedef int errcode;
551 #endif
552
553 typedef int errno_t;
554 #endif
555
556 #ifndef _TIME32_T_DEFINED
557 typedef _W64 long __time32_t;     /* 32-bit time value */
558 #define _TIME32_T_DEFINED
559 #endif
560
561 #ifndef _TIME64_T_DEFINED
562 typedef __int64 __time64_t;        /* 64-bit time value */
563 #define _TIME64_T_DEFINED
564 #endif
565
566 #ifndef _TIME_T_DEFINED
567 #ifdef _USE_32BIT_TIME_T
568 typedef __time32_t time_t;          /* time value */
569 #else
570 typedef __time64_t time_t;          /* time value */
571 #endif
572 #define _TIME_T_DEFINED               /* avoid multiple def's of time_t */
573 #endif
574
575 #ifndef _CONST_RETURN
576 #ifdef  __cplusplus
577 #define _CONST_RETURN  const
578 #define _CRT_CONST_CORRECT_OVERLOADS
579 #else
580 #define _CONST_RETURN
581 #endif
582 #endif
583
584 #if !defined(UNALIGNED)
585 #if defined(_M_IA64) || defined(_M_AMD64)
586 #define UNALIGNED __unaligned
587 #else
588 #define UNALIGNED
589 #endif
590 #endif
591
592 #if !defined(_CRT_ALIGN)
593 #if defined(__midl)
594 #define _CRT_ALIGN(x)
595 #else
596 #define _CRT_ALIGN(x) __declspec(align(x))
597 #endif
598 #endif
599
600 /* Define _CRTNOALIAS, _CRTRESTRICT */
601
602 #if        _MSC_FULL_VER >= 13102050
603 #if !defined(_MSC_VER_GREATER_THEN_13102050)
604 #define _MSC_VER_GREATER_THEN_13102050 
605 #endif
606 #endif
607
608 #if        ( defined(_M_IA64) && defined(_MSC_VER_GREATER_THEN_13102050) ) || _MSC_VER >= 1400
609 #ifndef _CRTNOALIAS
610 #define _CRTNOALIAS __declspec(noalias)
611 #endif  /* _CRTNOALIAS */
612
613 #ifndef _CRTRESTRICT
614 #define _CRTRESTRICT __declspec(restrict)
615 #endif  /* _CRTRESTRICT */
616
617 #else
618
619 #ifndef _CRTNOALIAS
620 #define _CRTNOALIAS
621 #endif  /* _CRTNOALIAS */
622
623 #ifndef _CRTRESTRICT
624 #define _CRTRESTRICT
625 #endif  /* _CRTRESTRICT */
626
627 #endif
628
629 /* Define __cdecl for non-Microsoft compilers */
630 #if        ( !defined(_MSC_VER) && !defined(__cdecl) )
631 #define __cdecl
632 #endif
633
634 #if !defined(__CRTDECL)
635 #if defined(_M_CEE_PURE)
636 #define __CRTDECL
637 #else
638 #define __CRTDECL     __cdecl
Lines 639 ... 2064 are skipped.
2065              int * ctype1_refcount;
2066              unsigned short * ctype1;
2067              const unsigned short * pctype;
2068              const unsigned char * pclmap;
2069              const unsigned char * pcumap;
2070              struct __lc_time_data * lc_time_curr;
2071 } threadlocinfo;
2072 #define _THREADLOCALEINFO
2073 #endif
2074
2075 #ifdef  __cplusplus
2076 }
2077 #endif
2078
2079 #if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN)
2080 #define _Check_return_opt_ _Check_return_
2081 #else
2082 #define _Check_return_opt_
2083 #endif
2084
2085 #if defined(_PREFAST_) && defined(_PFT_SHOULD_CHECK_RETURN_WAT)
2086 #define _Check_return_wat_ _Check_return_
2087 #else
2088 #define _Check_return_wat_
2089 #endif
2090
2091 #if !defined(__midl) && !defined(MIDL_PASS) && defined(_PREFAST_) 
2092 #define __crt_typefix(ctype)                       __declspec("SAL_typefix(" __CRT_STRINGIZE(ctype) ")")
2093 #else
2094 #define __crt_typefix(ctype)
2095 #endif
2096
2097 #if (defined(__midl))
2098 /* suppress tchar inlines */
2099 #ifndef _NO_INLINING
2100 #define _NO_INLINING
2101 #endif
2102 #endif
2103
2104 #ifndef _CRT_UNUSED
2105 #define _CRT_UNUSED(x) (void)x
2106 #endif
2107
2108 #ifdef  _MSC_VER
2109 #pragma pack(pop)
2110 #endif  /* _MSC_VER */
2111
2112 #endif  /* _INC_CRTDEFS */
2113