Files
Henric Müller fe5fceab9c 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.
2016-10-11 13:09:15 +02:00

46 lines
915 B
C#
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// ZipFileInfo.cs created with MonoDevelop
// User: alan at 12:14 13/10/2008
//
// To change standard headers go to Edit->Preferences->Coding->Standard Headers
//
using System;
using System.Runtime.InteropServices;
namespace zipsharp
{
[StructLayoutAttribute (LayoutKind.Sequential)]
struct ZipFileInfo32
{
ZipTime date;
uint dosDate;
uint internalFileAttributes;
uint externalFileAttributes;
public ZipFileInfo32 (DateTime fileTime)
{
date = new ZipTime (fileTime);
dosDate = 0;
internalFileAttributes = 0;
externalFileAttributes = 0;
}
}
[StructLayoutAttribute (LayoutKind.Sequential)]
struct ZipFileInfo64
{
ZipTime date;
ulong dosDate;
ulong internalFileAttributes;
ulong externalFileAttributes;
public ZipFileInfo64 (DateTime fileTime)
{
date = new ZipTime (fileTime);
dosDate = 0;
internalFileAttributes = 0;
externalFileAttributes = 0;
}
}
}