Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

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 // Only new MSVC has _strtoi64. Older compilers are screwed (will get undefined ref error)
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 LIBSMBIOS_PACKED_ATTR
00035 
00036 // we require RTTI, guard against users:
00037 #ifndef _CPPRTTI
00038 #error RTTI required
00039 #endif
00040 
00041 #if _MSC_VER <= 1200  // 1200 == VC++ 6.0
00042 #pragma warning( disable : 4786 ) // ident trunc to '255' chars in debug info
00043 #  define LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
00044 #  define LIBSMBIOS_NO_VOID_RETURNS
00045 #  define LIBSMBIOS_NO_EXCEPTION_STD_NAMESPACE
00046 #  define LIBSMBIOS_NO_STDC_NAMESPACE
00047    // disable min/max macro defines on vc6:
00048    //
00049 #endif
00050 
00051 #if (_MSC_VER <= 1300)  // 1300 == VC++ 7.0
00052 
00053 #if !defined(_MSC_EXTENSIONS) && !defined(LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS)      // VC7 bug with /Za
00054 #  define LIBSMBIOS_NO_DEPENDENT_TYPES_IN_TEMPLATE_VALUE_PARAMETERS
00055 #endif
00056 
00057 #  define LIBSMBIOS_NO_EXPLICIT_FUNCTION_TEMPLATE_ARGUMENTS
00058 #  define LIBSMBIOS_NO_INCLASS_MEMBER_INITIALIZATION
00059 #  define LIBSMBIOS_NO_PRIVATE_IN_AGGREGATE
00060 #  define LIBSMBIOS_NO_ARGUMENT_DEPENDENT_LOOKUP
00061 #  define LIBSMBIOS_NO_INTEGRAL_INT64_T
00062 #  define LIBSMBIOS_NO_DEDUCED_TYPENAME
00063 #  define LIBSMBIOS_NO_USING_DECLARATION_OVERLOADS_FROM_TYPENAME_BASE
00064 
00065 //    VC++ 6/7 has member templates but they have numerous problems including
00066 //    cases of silent failure, so for safety we define:
00067 #  define LIBSMBIOS_NO_MEMBER_TEMPLATES
00068 //    For VC++ experts wishing to attempt workarounds, we define:
00069 #  define LIBSMBIOS_MSVC6_MEMBER_TEMPLATES
00070 
00071 #  define LIBSMBIOS_NO_MEMBER_TEMPLATE_FRIENDS
00072 #  define LIBSMBIOS_NO_TEMPLATE_PARTIAL_SPECIALIZATION
00073 #  define LIBSMBIOS_NO_CV_VOID_SPECIALIZATIONS
00074 #  define LIBSMBIOS_NO_FUNCTION_TEMPLATE_ORDERING
00075 #  define LIBSMBIOS_NO_USING_TEMPLATE
00076 #  define LIBSMBIOS_NO_SWPRINTF
00077 #  define LIBSMBIOS_NO_TEMPLATE_TEMPLATES
00078 #  define LIBSMBIOS_NO_SFINAE
00079 #  if (_MSC_VER > 1200)
00080 #     define LIBSMBIOS_NO_MEMBER_FUNCTION_SPECIALIZATIONS
00081 #  endif
00082 
00083 #endif
00084 
00085 #if _MSC_VER >= 1300
00086 // VC++ 7 and higher have __FUNCTION__ macro
00087 #define LIBSMBIOS_HAS_FUNCTION
00088 #endif
00089 
00090 #if _MSC_VER < 1310 // 1310 == VC++ 7.1
00091 #  define LIBSMBIOS_NO_SWPRINTF
00092 #endif
00093 
00094 #if _MSC_VER <= 1310
00095 #  define LIBSMBIOS_NO_MEMBER_TEMPLATE_FRIENDS
00096 #endif
00097 
00098 #ifndef _NATIVE_WCHAR_T_DEFINED
00099 #  define LIBSMBIOS_NO_INTRINSIC_WCHAR_T
00100 #endif
00101 
00102 //   
00103 // check for exception handling support:   
00104 #ifndef _CPPUNWIND   
00105 #  define LIBSMBIOS_NO_EXCEPTIONS   
00106 #endif 
00107 
00108 //
00109 // __int64 support:
00110 //
00111 #if (_MSC_VER >= 1200)
00112 #   define LIBSMBIOS_HAS_MS_INT64
00113 #endif
00114 #if (_MSC_VER >= 1310) && defined(_MSC_EXTENSIONS)
00115 #   define LIBSMBIOS_HAS_LONG_LONG
00116 #endif
00117 //
00118 // disable Win32 API's if compiler extentions are
00119 // turned off:
00120 //
00121 #ifndef _MSC_EXTENSIONS
00122 #  define LIBSMBIOS_DISABLE_WIN32
00123 #endif
00124 
00125 //
00126 // all versions support __declspec:
00127 //
00128 #define LIBSMBIOS_HAS_DECLSPEC
00129 //
00130 // prefix and suffix headers:
00131 //
00132 #ifndef LIBSMBIOS_ABI_PREFIX
00133 #  define LIBSMBIOS_ABI_PREFIX "smbios/config/abi/msvc_prefix.hpp"
00134 #endif
00135 #ifndef LIBSMBIOS_ABI_SUFFIX
00136 #  define LIBSMBIOS_ABI_SUFFIX "smbios/config/abi/msvc_suffix.hpp"
00137 #endif
00138 
00139 # if _MSC_VER == 1200
00140 #   define LIBSMBIOS_COMPILER_VERSION 6.0
00141 # elif _MSC_VER == 1300
00142 #   define LIBSMBIOS_COMPILER_VERSION 7.0
00143 # elif _MSC_VER == 1310
00144 #   define LIBSMBIOS_COMPILER_VERSION 7.1
00145 # else
00146 #   define LIBSMBIOS_COMPILER_VERSION _MSC_VER
00147 # endif
00148 
00149 #define LIBSMBIOS_COMPILER "Microsoft Visual C++ version " LIBSMBIOS_STRINGIZE(LIBSMBIOS_COMPILER_VERSION)
00150 
00151 //
00152 // versions check:
00153 // we don't support Visual C++ prior to version 6:
00154 #if _MSC_VER < 1200
00155 #error "Compiler looks ancient. Sorry but we dont support it MSVC++ prior to version 6."
00156 #endif
00157 //
00158 // last known and checked version is 1310:
00159 #if (_MSC_VER > 1400)
00160 #  if defined(LIBSMBIOS_ASSERT_CONFIG)
00161 #     error "Unknown compiler version - please run the configure tests and report the results"
00162 #  else
00163 #     pragma message("Unknown compiler version - please run the configure tests and report the results")
00164 #  endif
00165 #endif

Generated on Wed Apr 11 16:25:10 2007 for SMBIOS Library by doxygen 1.3.5