Fixed Project's Interop.Zlib.cs link to use common/src/Interop instead. (dotnet/coref...
authorErhan Atesoglu <47518605+eanova@users.noreply.github.com>
Sat, 23 Mar 2019 23:18:54 +0000 (16:18 -0700)
committerStephen Toub <stoub@microsoft.com>
Sat, 23 Mar 2019 23:18:54 +0000 (19:18 -0400)
Commit migrated from https://github.com/dotnet/corefx/commit/c3effbbd54289597f711cceda6bc3a56e825230b

src/libraries/Common/src/Interop/Interop.zlib.cs [new file with mode: 0644]
src/libraries/System.IO.Compression/src/Interop/Interop.zlib.cs [deleted file]
src/libraries/System.IO.Compression/src/System.IO.Compression.csproj

diff --git a/src/libraries/Common/src/Interop/Interop.zlib.cs b/src/libraries/Common/src/Interop/Interop.zlib.cs
new file mode 100644 (file)
index 0000000..871f6c3
--- /dev/null
@@ -0,0 +1,39 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.IO.Compression;
+using System.Runtime.InteropServices;
+
+internal static partial class Interop
+{
+    internal static partial class zlib
+    {
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateInit2_")]
+        internal static extern ZLibNative.ErrorCode DeflateInit2_(
+            ref ZLibNative.ZStream stream,
+            ZLibNative.CompressionLevel level,
+            ZLibNative.CompressionMethod method,
+            int windowBits,
+            int memLevel,
+            ZLibNative.CompressionStrategy strategy);
+
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Deflate")]
+        internal static extern ZLibNative.ErrorCode Deflate(ref ZLibNative.ZStream stream, ZLibNative.FlushCode flush);
+
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateEnd")]
+        internal static extern ZLibNative.ErrorCode DeflateEnd(ref ZLibNative.ZStream stream);
+
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateInit2_")]
+        internal static extern ZLibNative.ErrorCode InflateInit2_(ref ZLibNative.ZStream stream, int windowBits);
+
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Inflate")]
+        internal static extern ZLibNative.ErrorCode Inflate(ref ZLibNative.ZStream stream, ZLibNative.FlushCode flush);
+
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateEnd")]
+        internal static extern ZLibNative.ErrorCode InflateEnd(ref ZLibNative.ZStream stream);
+
+        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Crc32")]
+        internal static extern unsafe uint crc32(uint crc, byte* buffer, int len);
+    }
+}
diff --git a/src/libraries/System.IO.Compression/src/Interop/Interop.zlib.cs b/src/libraries/System.IO.Compression/src/Interop/Interop.zlib.cs
deleted file mode 100644 (file)
index 871f6c3..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System.IO.Compression;
-using System.Runtime.InteropServices;
-
-internal static partial class Interop
-{
-    internal static partial class zlib
-    {
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateInit2_")]
-        internal static extern ZLibNative.ErrorCode DeflateInit2_(
-            ref ZLibNative.ZStream stream,
-            ZLibNative.CompressionLevel level,
-            ZLibNative.CompressionMethod method,
-            int windowBits,
-            int memLevel,
-            ZLibNative.CompressionStrategy strategy);
-
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Deflate")]
-        internal static extern ZLibNative.ErrorCode Deflate(ref ZLibNative.ZStream stream, ZLibNative.FlushCode flush);
-
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_DeflateEnd")]
-        internal static extern ZLibNative.ErrorCode DeflateEnd(ref ZLibNative.ZStream stream);
-
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateInit2_")]
-        internal static extern ZLibNative.ErrorCode InflateInit2_(ref ZLibNative.ZStream stream, int windowBits);
-
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Inflate")]
-        internal static extern ZLibNative.ErrorCode Inflate(ref ZLibNative.ZStream stream, ZLibNative.FlushCode flush);
-
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_InflateEnd")]
-        internal static extern ZLibNative.ErrorCode InflateEnd(ref ZLibNative.ZStream stream);
-
-        [DllImport(Libraries.CompressionNative, EntryPoint = "CompressionNative_Crc32")]
-        internal static extern unsafe uint crc32(uint crc, byte* buffer, int len);
-    }
-}
index 876c3518461456787b1650555655a882342072d9..ba5b5141952c942a20740fc704437c8797eb83c9 100644 (file)
@@ -8,7 +8,7 @@
   </PropertyGroup>
   <!-- Default configurations to help VS understand the options -->
   <ItemGroup>
-    <Compile Include="Interop\Interop.zlib.cs" />
+    <Compile Include="$(CommonPath)\Interop\Interop.zlib.cs" />
     <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchive.cs" />
     <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchiveEntry.cs" />
     <Compile Include="$(SharedOpenSourcePath)System\IO\Compression\ZipArchiveMode.cs" />