Commit 1f7282c9 authored by Jamie Madill's avatar Jamie Madill Committed by Commit Bot

Fix zlib build on UWP.

Uses the recommended check for WINAPI_FAMILY instead of outdated code.
If this patch sticks and is stable I'll submit a pull request to the
official zlib repo.

Bug: 1061905
Change-Id: I48fa8c884e8f78bbf890cc7f41ac610395833fff
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2105453Reviewed-by: default avatarChris Blume <cblume@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#750639}
parent 3ddaf449
...@@ -31,14 +31,12 @@ ...@@ -31,14 +31,12 @@
#define _WIN32_WINNT 0x601 #define _WIN32_WINNT 0x601
#endif #endif
#if _WIN32_WINNT >= _WIN32_WINNT_WIN8 #if !defined(IOWIN32_USING_WINRT_API)
// see Include/shared/winapifamily.h in the Windows Kit #if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API))) // Windows Store or Universal Windows Platform
#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
#define IOWIN32_USING_WINRT_API 1 #define IOWIN32_USING_WINRT_API 1
#endif #endif
#endif #endif
#endif
voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode)); voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode));
uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size)); uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
......
diff --git a/third_party/zlib/contrib/minizip/iowin32.c b/third_party/zlib/contrib/minizip/iowin32.c
index 246ceb91a139..c6bc314b3c28 100644
--- a/third_party/zlib/contrib/minizip/iowin32.c
+++ b/third_party/zlib/contrib/minizip/iowin32.c
@@ -31,14 +31,12 @@
#define _WIN32_WINNT 0x601
#endif
-#if _WIN32_WINNT >= _WIN32_WINNT_WIN8
-// see Include/shared/winapifamily.h in the Windows Kit
-#if defined(WINAPI_FAMILY_PARTITION) && (!(defined(IOWIN32_USING_WINRT_API)))
-#if WINAPI_FAMILY_ONE_PARTITION(WINAPI_FAMILY, WINAPI_PARTITION_APP)
+#if !defined(IOWIN32_USING_WINRT_API)
+#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
+// Windows Store or Universal Windows Platform
#define IOWIN32_USING_WINRT_API 1
#endif
#endif
-#endif
voidpf ZCALLBACK win32_open_file_func OF((voidpf opaque, const char* filename, int mode));
uLong ZCALLBACK win32_read_file_func OF((voidpf opaque, voidpf stream, void* buf, uLong size));
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment