Visual Studio Projects: Avoid compiler warnings when building pthreads

The project migration process from VS2008 to VS2015 doesn't bring in
project/solution wide migration compile defines that are introduced in
Visual Studio Community's migration which adds _USING_V110_SDK71.
This affects source modules which explicitly don't inherit project wide
defines.  The compile of pthread.c (in various projects) is such a case.
This commit is contained in:
Mark Pizzolato 2016-05-22 11:36:39 -07:00
parent d3bc8f6633
commit 3d7c4dc510

View file

@ -56,15 +56,20 @@ echo.
if ERRORLEVEL 1 exit /B 1 if ERRORLEVEL 1 exit /B 1
echo warning: Adding Windows XP suppport to all project files at %TIME% echo warning: Adding Windows XP suppport to all project files at %TIME%
call :FindVCVersion _VC_VER
echo Set objFSO = CreateObject("Scripting.FileSystemObject") >>%1.fix.vbs echo Set objFSO = CreateObject("Scripting.FileSystemObject") >>%1.fix.vbs
echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 1) >>%1.fix.vbs echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 1) >>%1.fix.vbs
echo. >>%1.fix.vbs echo. >>%1.fix.vbs
echo strText = objFile.ReadAll >>%1.fix.vbs echo strText = objFile.ReadAll >>%1.fix.vbs
echo objFile.Close >>%1.fix.vbs echo objFile.Close >>%1.fix.vbs
echo strNewText = Replace(strText, "</PlatformToolset>", "_xp</PlatformToolset>") >>%1.fix.vbs echo strText = Replace(strText, "</PlatformToolset>", "_xp</PlatformToolset>") >>%1.fix.vbs
echo. >>%1.fix.vbs echo. >>%1.fix.vbs
if %_VC_VER% GEQ 14 echo strText = Replace(strText, _>>%1.fix.vbs
if %_VC_VER% GEQ 14 echo "__CLEANUP_C</PreprocessorDefinitions>", _>>%1.fix.vbs
if %_VC_VER% GEQ 14 echo "__CLEANUP_C;_USING_V110_SDK71_</PreprocessorDefinitions>") _>>%1.fix.vbs
if %_VC_VER% GEQ 14 echo. >>%1.fix.vbs
echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 2) >>%1.fix.vbs echo Set objFile = objFSO.OpenTextFile(Wscript.Arguments(0), 2) >>%1.fix.vbs
echo objFile.Write strNewText >>%1.fix.vbs echo objFile.Write strText >>%1.fix.vbs
echo objFile.Close >>%1.fix.vbs echo objFile.Close >>%1.fix.vbs
call :_Fix_PlatformToolset %1 %1 call :_Fix_PlatformToolset %1 %1