|
|
|
| 1 |
|
/*** |
| 2 |
|
*use_ansi.h - pragmas for ANSI Standard C++ libraries |
| 3 |
|
* |
| 4 |
|
* Copyright (c) Microsoft Corporation. All rights reserved. |
| 5 |
|
* |
| 6 |
|
*Purpose: |
| 7 |
|
* This header is intended to force the use of the appropriate ANSI |
| 8 |
|
* Standard C++ libraries whenever it is included. |
| 9 |
|
* |
| 10 |
|
* [Public] |
| 11 |
|
* |
| 12 |
|
****/ |
| 13 |
|
|
| 14 |
|
#pragma once |
| 15 |
|
|
| 16 |
|
#ifndef _USE_ANSI_CPP |
| 17 |
|
#define _USE_ANSI_CPP |
| 18 |
|
|
| 19 |
|
#undef _CRT_NOPRAGMA_LIBS |
| 20 |
|
|
| 21 |
|
#ifndef _CRT_NOPRAGMA_LIBS |
| 22 |
|
|
| 23 |
|
#if !defined(_M_CEE_PURE) && !defined(MRTDLL) |
| 24 |
|
|
| 25 |
|
#if defined(_DLL) && !defined(_STATIC_CPPLIB) |
| 26 |
|
#ifdef _DEBUG |
| 27 |
|
#pragma comment(lib,"msvcprtd") |
| 28 |
|
#else /* _DEBUG */ |
| 29 |
|
#pragma comment(lib,"msvcprt") |
| 30 |
|
#endif /* _DEBUG */ |
| 31 |
|
|
| 32 |
|
#if !defined(_STL_NOFORCE_MANIFEST) |
| 33 |
|
|
| 34 |
|
#ifdef _DEBUG |
| 35 |
|
#ifdef _CRT_MANIFEST_RETAIL |
| 36 |
|
#define _CRT_MANIFEST_INCONSISTENT |
| 37 |
|
#else |
| 38 |
|
#define _CRT_MANIFEST_DEBUG |
| 39 |
|
#endif |
| 40 |
|
#else |
| 41 |
|
#ifdef _CRT_MANIFEST_DEBUG |
| 42 |
|
#define _CRT_MANIFEST_INCONSISTENT |
| 43 |
|
#else |
| 44 |
|
#define _CRT_MANIFEST_RETAIL |
| 45 |
|
#endif |
| 46 |
|
#endif |
| 47 |
|
|
| 48 |
|
#ifdef _CRT_MANIFEST_INCONSISTENT |
| 49 |
|
#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. |
| 50 |
|
#endif |
| 51 |
|
|
| 52 |
|
#include <crtassem.h> |
| 53 |
|
|
| 54 |
|
#ifdef _M_IX86 |
| 55 |
|
|
| 56 |
|
#ifdef _DEBUG |
| 57 |
|
#pragma comment(linker,"/manifestdependency:\"type='win32' " \ |
| 58 |
|
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".DebugCRT' " \ |
| 59 |
|
"version='" _CRT_ASSEMBLY_VERSION "' " \ |
| 60 |
|
"processorArchitecture='x86' " \ |
| 61 |
|
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"") |
| 62 |
|
#else |
| 63 |
|
#pragma comment(linker,"/manifestdependency:\"type='win32' " \ |
| 64 |
|
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \ |
| 65 |
|
"version='" _CRT_ASSEMBLY_VERSION "' " \ |
| 66 |
|
"processorArchitecture='x86' " \ |
| 67 |
|
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"") |
| 68 |
|
#endif |
| 69 |
|
|
| 70 |
|
#endif /* _M_IX86 */ |
| 71 |
|
|
| 72 |
|
#ifdef _M_AMD64 |
| 73 |
|
|
| 74 |
|
#ifdef _DEBUG |
| 75 |
|
#pragma comment(linker,"/manifestdependency:\"type='win32' " \ |
| 76 |
|
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".DebugCRT' " \ |
| 77 |
|
"version='" _CRT_ASSEMBLY_VERSION "' " \ |
| 78 |
|
"processorArchitecture='amd64' " \ |
| 79 |
|
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"") |
| 80 |
|
#else |
| 81 |
|
#pragma comment(linker,"/manifestdependency:\"type='win32' " \ |
| 82 |
|
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".CRT' " \ |
| 83 |
|
"version='" _CRT_ASSEMBLY_VERSION "' " \ |
| 84 |
|
"processorArchitecture='amd64' " \ |
| 85 |
|
"publicKeyToken='" _VC_ASSEMBLY_PUBLICKEYTOKEN "'\"") |
| 86 |
|
#endif |
| 87 |
|
|
| 88 |
|
#endif /* _M_AMD64 */ |
| 89 |
|
|
| 90 |
|
#ifdef _M_IA64 |
| 91 |
|
|
| 92 |
|
#ifdef _DEBUG |
| 93 |
|
#pragma comment(linker,"/manifestdependency:\"type='win32' " \ |
| 94 |
|
"name='" __LIBRARIES_ASSEMBLY_NAME_PREFIX ".DebugCRT' " \ |
| 95 |
|
"version='" _CRT_ASSEMBLY_VERSION "' " \ |
| 96 |
|
"processorArchitecture='ia64' " \ |