visualc.hpp

Go to the documentation of this file.
00001 //  (C) Copyright John Maddock 2001 - 2003. 
00002 //  (C) Copyright Darin Adler 2001 - 2002. 
00003 //  (C) Copyright Peter Dimov 2001. 
00004 //  (C) Copyright Aleksey Gurtovoy 2002. 
00005 //  (C) Copyright David Abrahams 2002 - 2003. 
00006 //  (C) Copyright Beman Dawes 2002 - 2003. 
00007 //  Use, modification and distribution are subject to the 
00008 //  Boost Software License, Version 1.0. (See accompanying file 
00009 //  LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
00010 
00011 //  See http://www.boost.org for most recent version.
00012 
00013 //  Microsoft Visual C++ compiler setup:
00014 
00015 #define LIBSMBIOS_MSVC _MSC_VER
00016 
00017 // turn off the warnings before we #include anything
00018 // 4503: warning: decorated name length exceeded
00019 // 4250: 'class1' : inherits 'class2::member' via dominance
00020 // 4201: nonstandard extension used : nameless struct/union
00021 // 4127: warning: conditional expression is constant
00022 #pragma warning( disable : 4201 4250 4503 4127 )
00023 #ifndef DEBUG
00024 // 4702: unreachable code
00025 #pragma warning( disable : 4702 ) // disable in release because MS headers have tons of unreachable code
00026 #endif
00027 
00028 
00029 #define UNREFERENCED_PARAMETER(P)  (P)
00030 #define LIBSMBIOS_PACKED_ATTR
00031 
00032 // we require RTTI, guard against users:
00033 #ifndef _CPPRTTI
00034 #error RTTI required
00035 #endif
00036 
00037 #if _MSC_VER <= 1200  // 1200 == VC++ 6.0
00038 #pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
00039 #  define LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
00040 #  define LIBSMBIOS_NO_VOID_RETURNS
00041 #  define LIBSMBIOS_NO_EXCEPTION_STD_NAMESPACE
00042 #  define LIBSMBIOS_NO_STDC_NAMESPACE
00043    // disable min/max macro defines on vc6:
00044    //
00045 #endif
00046 
00047 #if (_MSC_VER <= 1300)  // 1300 == VC++ 7.0
00048 
00049 #if !defined(_MSC_EXTENSIONS) && !defined(LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS)      // VC7 bug with /Za
00050 #  define LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
00051 #endif
00052 
00053 #  define LIBSMBIOS_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
00054 #  define LIBSMBIOS_NO_INCLASS_MEMBER_INITIALIZATION
00055 #  define LIBSMBIOS_NO_PRIVATE_IN_AGGREGATE
00056 #  define LIBSMBIOS_NO_ARGUMENT_DEPENDENT_LOOKUP
00057 #  define LIBSMBIOS_NO_INTEGRAL_INT64_T
00058 #  define LIBSMBIOS_NO_DEDUCED_TYPENAME
00059 #  define LIBSMBIOS_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
00060 
00061 //    VC++ 6/7 has member templates but they have numerous problems including
00062 //    cases of silent failure, so for safety we define:
00063 #  define LIBSMBIOS_NO_MEMBER_TEMPLATES
00064 //    For VC++ experts wishing to attempt workarounds, we define:
00065 #  define LIBSMBIOS_MSVC6_MEMBER_TEMPLATES
00066 
00067 #  define LIBSMBIOS_NO_MEMBER_TEMPLATE_FRIENDS
00068 #  define LIBSMBIOS_NO_TEMPLATE_PARTIAL_SPECIALIZATION
00069 #  define LIBSMBIOS_NO_CV_VOID_SPECIALIZATIONS
00070 #  define LIBSMBIOS_NO_FUNCTION_TEMPLATE_ORDERING
00071 #  define LIBSMBIOS_NO_USING_TEMPLATE
00072 #  define LIBSMBIOS_NO_SWPRINTF
00073 #  define LIBSMBIOS_NO_TEMPLATE_TEMPLATES
00074 #  define LIBSMBIOS_NO_SFINAE
00075 #  if (_MSC_VER > 1200)
00076 #     define LIBSMBIOS_NO_MEMBER_FUNCTION_SPECIALIZATIONS
00077 #  endif
00078 
00079 #endif
00080 
00081 #if _MSC_VER >= 1300
00082 // VC++ 7 and higher have __FUNCTION__ macro
00083 #define LIBSMBIOS_HAS_FUNCTION
00084 #endif
00085 
00086 #if _MSC_VER < 1310 // 1310 == VC++ 7.1
00087 #  define LIBSMBIOS_NO_SWPRINTF
00088 #endif
00089 
00090 #if _MSC_VER <= 1310
00091 #  define LIBSMBIOS_NO_MEMBER_TEMPLATE_FRIENDS
00092 #endif
00093 
00094 #ifndef _NATIVE_WCHAR_T_DEFINED
00095 #  define LIBSMBIOS_NO_INTRINSIC_WCHAR_T
00096 #endif
00097 
00098 //   
00099 // check for exception handling support:   
00100 #ifndef _CPPUNWIND   
00101 #  define LIBSMBIOS_NO_EXCEPTIONS   
00102 #endif 
00103 
00104 //
00105 // __int64 support:
00106 //
00107 #if (_MSC_VER >= 1200)
00108 #   define LIBSMBIOS_HAS_MS_INT64
00109 #endif
00110 #if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
00111 #   define LIBSMBIOS_HAS_LONG_LONG
00112 #endif
00113 //
00114 // disable Win32 API's if compiler extentions are
00115 // turned off:
00116 //
00117 #ifndef _MSC_EXTENSIONS
00118 #  define LIBSMBIOS_DISABLE_WIN32
00119 #endif
00120 
00121 //
00122 // all versions support __declspec:
00123 //
00124 #define LIBSMBIOS_HAS_DECLSPEC
00125 //
00126 // prefix and suffix headers:
00127 //
00128 #ifndef LIBSMBIOS_ABI_PREFIX
00129 #  define LIBSMBIOS_ABI_PREFIX "smbios/config/abi/msvc_prefix.hpp"
00130 #endif
00131 #ifndef LIBSMBIOS_ABI_SUFFIX
00132 #  define LIBSMBIOS_ABI_SUFFIX "smbios/config/abi/msvc_suffix.hpp"
00133 #endif
00134 
00135 # if _MSC_VER == 1200
00136 #   define LIBSMBIOS_COMPILER_VERSION 6.0
00137 # elif _MSC_VER == 1300
00138 #   define LIBSMBIOS_COMPILER_VERSION 7.0
00139 # elif _MSC_VER == 1310
00140 #   define LIBSMBIOS_COMPILER_VERSION 7.1
00141 # else
00142 #   define LIBSMBIOS_COMPILER_VERSION _MSC_VER
00143 # endif
00144 
00145 #define LIBSMBIOS_COMPILER "Microsoft Visual C++ version " LIBSMBIOS_STRINGIZE(LIBSMBIOS_COMPILER_VERSION)
00146 
00147 //
00148 // versions check:
00149 // we don't support Visual C++ prior to version 6:
00150 #if _MSC_VER < 1200
00151 #error "Compiler not supported or configured - please reconfigure"
00152 #endif
00153 //
00154 // last known and checked version is 1310:
00155 #if (_MSC_VER > 1310)
00156 #  if defined(LIBSMBIOS_ASSERT_CONFIG)
00157 #     error "Unknown compiler version - please run the configure tests and report the results"
00158 #  else
00159 #     pragma message("Unknown compiler version - please run the configure tests and report the results")
00160 #  endif
00161 #endif
00162 
00163 
00164 
00165 
00166 
00167 
00168 
00169 

Generated on Tue Jan 17 02:59:08 2006 for SMBIOS Library by  doxygen 1.4.6