00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #define LIBSMBIOS_MSVC _MSC_VER
00016
00017
00018
00019
00020
00021
00022 #pragma warning( disable : 4201 4250 4503 4127 )
00023 #ifndef DEBUG
00024
00025 #pragma warning( disable : 4702 ) // disable in release because MS headers have tons of unreachable code
00026 #endif
00027
00028
00029 #if _MSC_VER >= 1300
00030 #define strtoll(p, e, b) _strtoi64(p, e, b)
00031 #endif
00032
00033 #define UNREFERENCED_PARAMETER(P) (P)
00034 #define MARK_UNUSED
00035 #define LIBSMBIOS_PACKED_ATTR
00036 #define _dbg_iostream_out(stream, line) do { stream << line; } while(0)
00037 #define _dbg_cout(line) _dbg_iostream_out(cout, line)
00038 #define _dbg_cerr(line) _dbg_iostream_out(cerr, line)
00039 #define _null_call(...) do {} while(0)
00040 #ifdef DEBUG_OUTPUT_ALL
00041 #include <iostream>
00042 #define DCOUT _dbg_cout
00043 #define DCERR _dbg_cerr
00044 #else
00045 #define DCOUT _null_call
00046 #define DCERR _null_call
00047 #endif
00048
00049
00050
00051
00052 #ifndef _CPPRTTI
00053 #error RTTI required
00054 #endif
00055
00056 #if _MSC_VER <= 1200 // 1200 == VC++ 6.0
00057 #pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
00058 # define LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
00059 # define LIBSMBIOS_NO_VOID_RETURNS
00060 # define LIBSMBIOS_NO_EXCEPTION_STD_NAMESPACE
00061 # define LIBSMBIOS_NO_STDC_NAMESPACE
00062
00063
00064 #endif
00065
00066 #if (_MSC_VER <= 1300) // 1300 == VC++ 7.0
00067
00068 #if !defined(_MSC_EXTENSIONS) && !defined(LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS) // VC7 bug with /Za
00069 # define LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
00070 #endif
00071
00072 # define LIBSMBIOS_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
00073 # define LIBSMBIOS_NO_INCLASS_MEMBER_INITIALIZATION
00074 # define LIBSMBIOS_NO_PRIVATE_IN_AGGREGATE
00075 # define LIBSMBIOS_NO_ARGUMENT_DEPENDENT_LOOKUP
00076 # define LIBSMBIOS_NO_INTEGRAL_INT64_T
00077 # define LIBSMBIOS_NO_DEDUCED_TYPENAME
00078 # define LIBSMBIOS_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
00079
00080
00081
00082 # define LIBSMBIOS_NO_MEMBER_TEMPLATES
00083
00084 # define LIBSMBIOS_MSVC6_MEMBER_TEMPLATES
00085
00086 # define LIBSMBIOS_NO_MEMBER_TEMPLATE_FRIENDS
00087 # define LIBSMBIOS_NO_TEMPLATE_PARTIAL_SPECIALIZATION
00088 # define LIBSMBIOS_NO_CV_VOID_SPECIALIZATIONS
00089 # define LIBSMBIOS_NO_FUNCTION_TEMPLATE_ORDERING
00090 # define LIBSMBIOS_NO_USING_TEMPLATE
00091 # define LIBSMBIOS_NO_SWPRINTF
00092 # define LIBSMBIOS_NO_TEMPLATE_TEMPLATES
00093 # define LIBSMBIOS_NO_SFINAE
00094 # if (_MSC_VER > 1200)
00095 # define LIBSMBIOS_NO_MEMBER_FUNCTION_SPECIALIZATIONS
00096 # endif
00097
00098 #endif
00099
00100 #if _MSC_VER >= 1300
00101
00102 #define LIBSMBIOS_HAS_FUNCTION
00103 #endif
00104
00105 #if _MSC_VER < 1310 // 1310 == VC++ 7.1
00106 # define LIBSMBIOS_NO_SWPRINTF
00107 #endif
00108
00109 #if _MSC_VER <= 1310
00110 # define LIBSMBIOS_NO_MEMBER_TEMPLATE_FRIENDS
00111 #endif
00112
00113 #ifndef _NATIVE_WCHAR_T_DEFINED
00114 # define LIBSMBIOS_NO_INTRINSIC_WCHAR_T
00115 #endif
00116
00117
00118
00119 #ifndef _CPPUNWIND
00120 # define LIBSMBIOS_NO_EXCEPTIONS
00121 #endif
00122
00123
00124
00125
00126 #if (_MSC_VER >= 1200)
00127 # define LIBSMBIOS_HAS_MS_INT64
00128 #endif
00129 #if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
00130 # define LIBSMBIOS_HAS_LONG_LONG
00131 #endif
00132
00133
00134
00135
00136 #ifndef _MSC_EXTENSIONS
00137 # define LIBSMBIOS_DISABLE_WIN32
00138 #endif
00139
00140
00141
00142
00143 #define LIBSMBIOS_HAS_DECLSPEC
00144
00145
00146
00147 #ifndef LIBSMBIOS_ABI_PREFIX
00148 # define LIBSMBIOS_ABI_PREFIX "smbios/config/abi/msvc_prefix.hpp"
00149 #endif
00150 #ifndef LIBSMBIOS_ABI_SUFFIX
00151 # define LIBSMBIOS_ABI_SUFFIX "smbios/config/abi/msvc_suffix.hpp"
00152 #endif
00153
00154 # if _MSC_VER == 1200
00155 # define LIBSMBIOS_COMPILER_VERSION 6.0
00156 # elif _MSC_VER == 1300
00157 # define LIBSMBIOS_COMPILER_VERSION 7.0
00158 # elif _MSC_VER == 1310
00159 # define LIBSMBIOS_COMPILER_VERSION 7.1
00160 # else
00161 # define LIBSMBIOS_COMPILER_VERSION _MSC_VER
00162 # endif
00163
00164 #define LIBSMBIOS_COMPILER "Microsoft Visual C++ version " LIBSMBIOS_STRINGIZE(LIBSMBIOS_COMPILER_VERSION)
00165
00166
00167
00168
00169 #if _MSC_VER < 1200
00170 #error "Compiler looks ancient. Sorry but we dont support it MSVC++ prior to version 6."
00171 #endif
00172
00173
00174 #if (_MSC_VER > 1400)
00175 # if defined(LIBSMBIOS_ASSERT_CONFIG)
00176 # error "Unknown compiler version - please run the configure tests and report the results"
00177 # else
00178 # pragma message("Unknown compiler version - please run the configure tests and report the results")
00179 # endif
00180 #endif