Make ZipSharp work on Windows
authorHenric Müller <hemuller@microsoft.com>
Wed, 5 Oct 2016 12:35:25 +0000 (14:35 +0200)
committerHenric Müller <hemuller@microsoft.com>
Tue, 11 Oct 2016 11:09:15 +0000 (13:09 +0200)
commitfe5fceab9cdfe2279fc088c9b02f8a0b8202339d
treed677a50bd496d8773379d42f2f43bc11758be37b
parent8f181779a769d2bbfe406cb02695969b234401cf
Make ZipSharp work on Windows

This patch adds the zlib functions needed by ZipSharp to the VS
MonoPosixHelper.def export file.

This patch also changes the ZipSharp code to use different code paths
depending on the size of the C long type on the underlying platform. On
gcc/clang the C long type follows the bitness of the targeted architecture,
it's 32-bit on 32-bit systems and 64-bit on 64-bit systems. With the VS
compiler however, the C long type is always 32-bit regardless of the target
architecture. zlib and minizip uses C long in a number of different function
signatures and structs.
14 files changed:
mcs/class/WindowsBase/WindowsBase.dll.sources
mcs/class/WindowsBase/ZipSharp/IOFunctions.cs
mcs/class/WindowsBase/ZipSharp/NativeUnzip.cs
mcs/class/WindowsBase/ZipSharp/NativeVersion.cs [new file with mode: 0755]
mcs/class/WindowsBase/ZipSharp/NativeZip.cs
mcs/class/WindowsBase/ZipSharp/UnzipArchive.cs
mcs/class/WindowsBase/ZipSharp/UnzipFileInfo.cs
mcs/class/WindowsBase/ZipSharp/UnzipReadStream.cs
mcs/class/WindowsBase/ZipSharp/ZipArchive.cs
mcs/class/WindowsBase/ZipSharp/ZipFileInfo.cs
mcs/class/WindowsBase/ZipSharp/ZipStream.cs
msvc/monoposixhelper.def
msvc/monoposixhelper.vcxproj
msvc/monoposixhelper.vcxproj.filters