zlib: Rebuild, linking to C Runtime DLL on 32-bit.
authormark <mark@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Mon, 20 May 2013 22:34:56 +0000 (22:34 +0000)
committermark <mark@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Mon, 20 May 2013 22:34:56 +0000 (22:34 +0000)
git-svn-id: https://valelab.ucsf.edu/svn/3rdpartypublic@138 2c67d6c2-4361-4cd7-bd83-1149b1926c9b

zlib_build/VS2008/Win32/Debug/zlibstat.lib
zlib_build/VS2008/Win32/Release/zlibstat.lib
zlib_build/VS2008/build_zlib.bat
zlib_build/VS2008/c_runtime.patch [new file with mode: 0644]
zlib_build/VS2008/x64/Debug/zlibstat.lib
zlib_build/VS2008/x64/Release/zlibstat.lib

index 03f9b5c..0914754 100644 (file)
Binary files a/zlib_build/VS2008/Win32/Debug/zlibstat.lib and b/zlib_build/VS2008/Win32/Debug/zlibstat.lib differ
index a59a082..82c6751 100644 (file)
Binary files a/zlib_build/VS2008/Win32/Release/zlibstat.lib and b/zlib_build/VS2008/Win32/Release/zlibstat.lib differ
index f570ce6..1563e27 100644 (file)
@@ -17,12 +17,16 @@ if "%1" == "/F" (
   goto :EOF\r
 )\r
 echo.\r
-echo Before building, you should modify the project files to disable debug\r
-echo information generation, to prevent linker warnings when linking to the\r
-echo zlib static libraries.\r
-echo To do so, open %ZLIB_SRC_ROOT%\contrib\vstudio\vc9\zlibvc.sln, select all\r
-echo projects, view Properties, select All Configurations and All Platforms,\r
-echo and set C/C++ ^> General ^> Debug Information Format to Disabled.\r
+echo Before building, you should modify the project files to link to the DLL\r
+echo version of the Microsoft C Runtime (/MD or /MDd) in the Win32\r
+echo configuration. At least in zlib 1.2.8, the x64 configuration already\r
+echo uses this setting.\r
+echo.\r
+echo If MinGW is available, this can be accomplished by running\r
+echo   sed -i 's/RuntimeLibrary="0"/RuntimeLibrary="2"/' *.vcproj\r
+echo   sed -i 's/RuntimeLibrary="1"/RuntimeLibrary="3"/' *.vcproj\r
+echo in zlib/contrib/vstudio/vc9.\r
+echo.\r
 echo Rerun this batch file as '%0 /f' to bypass this message.\r
 goto :EOF\r
 \r
diff --git a/zlib_build/VS2008/c_runtime.patch b/zlib_build/VS2008/c_runtime.patch
new file mode 100644 (file)
index 0000000..67afb76
--- /dev/null
@@ -0,0 +1,153 @@
+diff -Naur a/contrib/vstudio/vc9/miniunz.vcproj b/contrib/vstudio/vc9/miniunz.vcproj
+--- a/contrib/vstudio/vc9/miniunz.vcproj       Mon May 20 15:26:14 2013
++++ b/contrib/vstudio/vc9/miniunz.vcproj       Mon May 20 14:30:04 2013
+@@ -51,7 +51,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="1"
++                              RuntimeLibrary="3"
+                               BufferSecurityCheck="false"
+                               UsePrecompiledHeader="0"
+                               AssemblerListingLocation="$(IntDir)\"
+@@ -135,7 +135,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+                               StringPooling="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+diff -Naur a/contrib/vstudio/vc9/minizip.vcproj b/contrib/vstudio/vc9/minizip.vcproj
+--- a/contrib/vstudio/vc9/minizip.vcproj       Mon May 20 15:26:14 2013
++++ b/contrib/vstudio/vc9/minizip.vcproj       Mon May 20 14:30:04 2013
+@@ -51,7 +51,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="1"
++                              RuntimeLibrary="3"
+                               BufferSecurityCheck="false"
+                               UsePrecompiledHeader="0"
+                               AssemblerListingLocation="$(IntDir)\"
+@@ -135,7 +135,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+                               StringPooling="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+diff -Naur a/contrib/vstudio/vc9/testzlib.vcproj b/contrib/vstudio/vc9/testzlib.vcproj
+--- a/contrib/vstudio/vc9/testzlib.vcproj      Mon May 20 15:26:14 2013
++++ b/contrib/vstudio/vc9/testzlib.vcproj      Mon May 20 14:30:04 2013
+@@ -51,7 +51,7 @@
+                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;_DEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="1"
++                              RuntimeLibrary="3"
+                               BufferSecurityCheck="false"
+                               UsePrecompiledHeader="0"
+                               AssemblerOutput="4"
+@@ -282,7 +282,7 @@
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+                               StringPooling="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+@@ -520,7 +520,7 @@
+                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+                               StringPooling="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+@@ -602,7 +602,7 @@
+                               AdditionalIncludeDirectories="..\..\.."
+                               PreprocessorDefinitions="ASMV;ASMINF;WIN32;ZLIB_WINAPI;NDEBUG;_CONSOLE;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               AssemblerListingLocation="$(IntDir)\"
+                       />
+diff -Naur a/contrib/vstudio/vc9/testzlibdll.vcproj b/contrib/vstudio/vc9/testzlibdll.vcproj
+--- a/contrib/vstudio/vc9/testzlibdll.vcproj   Mon May 20 15:26:14 2013
++++ b/contrib/vstudio/vc9/testzlibdll.vcproj   Mon May 20 14:30:04 2013
+@@ -51,7 +51,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;_DEBUG;_CONSOLE"
+                               MinimalRebuild="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="1"
++                              RuntimeLibrary="3"
+                               BufferSecurityCheck="false"
+                               UsePrecompiledHeader="0"
+                               AssemblerListingLocation="$(IntDir)\"
+@@ -135,7 +135,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;ZLIB_WINAPI;NDEBUG;_CONSOLE"
+                               StringPooling="true"
+                               BasicRuntimeChecks="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               UsePrecompiledHeader="0"
+diff -Naur a/contrib/vstudio/vc9/zlibstat.vcproj b/contrib/vstudio/vc9/zlibstat.vcproj
+--- a/contrib/vstudio/vc9/zlibstat.vcproj      Mon May 20 15:26:14 2013
++++ b/contrib/vstudio/vc9/zlibstat.vcproj      Mon May 20 14:30:04 2013
+@@ -50,7 +50,7 @@
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+                               ExceptionHandling="0"
+-                              RuntimeLibrary="1"
++                              RuntimeLibrary="3"
+                               BufferSecurityCheck="false"
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+                               AssemblerListingLocation="$(IntDir)\"
+@@ -272,7 +272,7 @@
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ASMV;ASMINF"
+                               StringPooling="true"
+                               ExceptionHandling="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+@@ -495,7 +495,7 @@
+                               PreprocessorDefinitions="WIN32;ZLIB_WINAPI;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS"
+                               StringPooling="true"
+                               ExceptionHandling="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile="$(IntDir)/zlibstat.pch"
+diff -Naur a/contrib/vstudio/vc9/zlibvc.vcproj b/contrib/vstudio/vc9/zlibvc.vcproj
+--- a/contrib/vstudio/vc9/zlibvc.vcproj        Mon May 20 15:26:14 2013
++++ b/contrib/vstudio/vc9/zlibvc.vcproj        Mon May 20 14:30:04 2013
+@@ -56,7 +56,7 @@
+                               AdditionalIncludeDirectories="..\..\..;..\..\masmx86"
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
+                               ExceptionHandling="0"
+-                              RuntimeLibrary="1"
++                              RuntimeLibrary="3"
+                               BufferSecurityCheck="false"
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
+                               AssemblerListingLocation="$(IntDir)\"
+@@ -640,7 +640,7 @@
+                               PreprocessorDefinitions="WIN32;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;ZLIB_WINAPI;ASMV;ASMINF"
+                               StringPooling="true"
+                               ExceptionHandling="0"
+-                              RuntimeLibrary="0"
++                              RuntimeLibrary="2"
+                               BufferSecurityCheck="false"
+                               EnableFunctionLevelLinking="true"
+                               PrecompiledHeaderFile="$(IntDir)/zlibvc.pch"
index b66afe4..85e3021 100644 (file)
Binary files a/zlib_build/VS2008/x64/Debug/zlibstat.lib and b/zlib_build/VS2008/x64/Debug/zlibstat.lib differ
index f970b39..bd342e6 100644 (file)
Binary files a/zlib_build/VS2008/x64/Release/zlibstat.lib and b/zlib_build/VS2008/x64/Release/zlibstat.lib differ