From b33af3a13856194ab4b6bd7f21f7f0f828768b8d Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Fri, 31 Aug 2018 13:27:00 +0200 Subject: [PATCH] Split the project files to versions for VC2010 and VC2017 --- .gitignore | 1 + WinStd.sln => WinStd-10.0.sln | 52 +++--- WinStd-15.0.sln | 31 ++++ build/{WinStd.vcxproj => WinStd-10.0.vcxproj} | 136 +++++++------- ...oj.filters => WinStd-10.0.vcxproj.filters} | 170 +++++++++--------- build/WinStd-15.0.vcxproj | 74 ++++++++ build/WinStd-15.0.vcxproj.filters | 86 +++++++++ include/WinStd/Common.h | 12 ++ 8 files changed, 383 insertions(+), 179 deletions(-) rename WinStd.sln => WinStd-10.0.sln (87%) create mode 100644 WinStd-15.0.sln rename build/{WinStd.vcxproj => WinStd-10.0.vcxproj} (98%) rename build/{WinStd.vcxproj.filters => WinStd-10.0.vcxproj.filters} (97%) create mode 100644 build/WinStd-15.0.vcxproj create mode 100644 build/WinStd-15.0.vcxproj.filters diff --git a/.gitignore b/.gitignore index ca33bfb7..e87a9297 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ /*.opensdf /doc /ipch +/.vs diff --git a/WinStd.sln b/WinStd-10.0.sln similarity index 87% rename from WinStd.sln rename to WinStd-10.0.sln index 306e4f15..dd5273a5 100644 --- a/WinStd.sln +++ b/WinStd-10.0.sln @@ -1,26 +1,26 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStd", "build\WinStd.vcxproj", "{47399D91-7EB9-41DE-B521-514BA5DB0C43}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|Win32.ActiveCfg = Debug|Win32 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|Win32.Build.0 = Debug|Win32 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.ActiveCfg = Debug|x64 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.Build.0 = Debug|x64 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|Win32.ActiveCfg = Release|Win32 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|Win32.Build.0 = Release|Win32 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.ActiveCfg = Release|x64 - {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStd-10.0", "build\WinStd-10.0.vcxproj", "{47399D91-7EB9-41DE-B521-514BA5DB0C43}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|Win32.ActiveCfg = Debug|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|Win32.Build.0 = Debug|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.ActiveCfg = Debug|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.Build.0 = Debug|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|Win32.ActiveCfg = Release|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|Win32.Build.0 = Release|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.ActiveCfg = Release|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/WinStd-15.0.sln b/WinStd-15.0.sln new file mode 100644 index 00000000..f887e685 --- /dev/null +++ b/WinStd-15.0.sln @@ -0,0 +1,31 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2016 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WinStd-15.0", "build\WinStd-15.0.vcxproj", "{47399D91-7EB9-41DE-B521-514BA5DB0C43}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.ActiveCfg = Debug|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x64.Build.0 = Debug|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x86.ActiveCfg = Debug|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Debug|x86.Build.0 = Debug|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.ActiveCfg = Release|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x64.Build.0 = Release|x64 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x86.ActiveCfg = Release|Win32 + {47399D91-7EB9-41DE-B521-514BA5DB0C43}.Release|x86.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CDBF4F12-7487-465C-8F31-9CFB3BDC2EE3} + EndGlobalSection +EndGlobal diff --git a/build/WinStd.vcxproj b/build/WinStd-10.0.vcxproj similarity index 98% rename from build/WinStd.vcxproj rename to build/WinStd-10.0.vcxproj index 080aadc2..1a699762 100644 --- a/build/WinStd.vcxproj +++ b/build/WinStd-10.0.vcxproj @@ -1,69 +1,69 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {47399D91-7EB9-41DE-B521-514BA5DB0C43} - WinStd - Win32Proj - - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - - - - + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {47399D91-7EB9-41DE-B521-514BA5DB0C43} + WinStd + Win32Proj + + + + StaticLibrary + Unicode + + + StaticLibrary + Unicode + + + StaticLibrary + Unicode + + + StaticLibrary + Unicode + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + \ No newline at end of file diff --git a/build/WinStd.vcxproj.filters b/build/WinStd-10.0.vcxproj.filters similarity index 97% rename from build/WinStd.vcxproj.filters rename to build/WinStd-10.0.vcxproj.filters index 363b635c..8e79e359 100644 --- a/build/WinStd.vcxproj.filters +++ b/build/WinStd-10.0.vcxproj.filters @@ -1,86 +1,86 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + \ No newline at end of file diff --git a/build/WinStd-15.0.vcxproj b/build/WinStd-15.0.vcxproj new file mode 100644 index 00000000..1ba2e7cd --- /dev/null +++ b/build/WinStd-15.0.vcxproj @@ -0,0 +1,74 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {47399D91-7EB9-41DE-B521-514BA5DB0C43} + WinStd + Win32Proj + 10.0.17134.0 + + + + StaticLibrary + Unicode + v141 + + + StaticLibrary + Unicode + v141 + + + StaticLibrary + Unicode + v141 + + + StaticLibrary + Unicode + v141 + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + + + + + \ No newline at end of file diff --git a/build/WinStd-15.0.vcxproj.filters b/build/WinStd-15.0.vcxproj.filters new file mode 100644 index 00000000..8e79e359 --- /dev/null +++ b/build/WinStd-15.0.vcxproj.filters @@ -0,0 +1,86 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hpp;hxx;hm;inl;inc;xsd + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + \ No newline at end of file diff --git a/include/WinStd/Common.h b/include/WinStd/Common.h index b48116bb..a54c32ff 100644 --- a/include/WinStd/Common.h +++ b/include/WinStd/Common.h @@ -140,6 +140,12 @@ private: /// @} + +#ifndef _FormatMessage_format_string_ +#define _FormatMessage_format_string_ +#endif + + namespace winstd { /// \addtogroup WinStdStrFormat @@ -273,7 +279,9 @@ namespace winstd /// /// \returns Number of characters in result. /// +#if _MSC_VER <= 1600 inline int vsnprintf(_Out_z_cap_(capacity) char *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const char *format, _In_ va_list arg); +#endif /// /// Formats string using `printf()`. @@ -1702,11 +1710,15 @@ namespace winstd #pragma warning(disable: 4995) #pragma warning(disable: 4996) +#if _MSC_VER <= 1600 + inline int vsnprintf(_Out_z_cap_(capacity) char *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const char *format, _In_ va_list arg) { return _vsnprintf(str, capacity, format, arg); } +#endif + inline int vsnprintf(_Out_z_cap_(capacity) wchar_t *str, _In_ size_t capacity, _In_z_ _Printf_format_string_ const wchar_t *format, _In_ va_list arg) {