Disable debug builds. Test function pointer compatibility.
diff --git a/appveyor.yml b/appveyor.yml index 9954edf..d62fe49 100644 --- a/appveyor.yml +++ b/appveyor.yml
@@ -7,10 +7,10 @@ TRIPLET: x64-windows CMAKE_OPTS: "-DBUILD_SHARED_LIBS=off" CMAKE_CONFIG: Release - - GENERATOR: "Visual Studio 15 2017 Win64" - TRIPLET: x64-windows - CMAKE_OPTS: "-DBUILD_SHARED_LIBS=off" - CMAKE_CONFIG: Debug +# - GENERATOR: "Visual Studio 15 2017 Win64" +# TRIPLET: x64-windows +# CMAKE_OPTS: "-DBUILD_SHARED_LIBS=off" +# CMAKE_CONFIG: Debug - GENERATOR: "Visual Studio 15 2017 Win64" TRIPLET: x64-uwp CMAKE_OPTS: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0" @@ -19,10 +19,10 @@ TRIPLET: x86-windows CMAKE_OPTS: "-DBUILD_SHARED_LIBS=off" CMAKE_CONFIG: Release - - GENERATOR: "Visual Studio 15 2017" - TRIPLET: x86-windows - CMAKE_OPTS: "-DBUILD_SHARED_LIBS=off" - CMAKE_CONFIG: Debug +# - GENERATOR: "Visual Studio 15 2017" +# TRIPLET: x86-windows +# CMAKE_OPTS: "-DBUILD_SHARED_LIBS=off" +# CMAKE_CONFIG: Debug - GENERATOR: "Visual Studio 15 2017" TRIPLET: x86-uwp CMAKE_OPTS: "-DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0"
diff --git a/lib/zip_source_file_win32_ansi.c b/lib/zip_source_file_win32_ansi.c index 1869a12..9e9b731 100644 --- a/lib/zip_source_file_win32_ansi.c +++ b/lib/zip_source_file_win32_ansi.c
@@ -36,6 +36,27 @@ static char *ansi_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp); static void ansi_make_tempname(char *buf, size_t len, const char *name, zip_uint32_t i); +struct test { + DWORD (__stdcall *get_file_attributes)(const void *name); +}; + +struct test test_a = { + GetFileAttributesA +}; + +struct test test_w = { + GetFileAttributesW +}; + +static +DWORD __stdcall *get_file_attributes_own(const void *name) { + return 0; +} + +struct test test_own = { + get_file_attributes_own +}; + zip_source_file_win32_write_operations_t ops_ansi = { ansi_allocate_tempname, CreateFileA,