UWP: Order includes, avoid file attrs to buildfix.

Not sure why CREATEFILE2_EXTENDED_PARAMETERS isn't being found.
This commit is contained in:
Unknown W. Brackets committed 2021-05-09 21:56:34 -07:00
1 parent 18a51b8e97
commit ba4fb398ca
5 files changed
+20 -2

No files matched your search

+1
View File
@@ -1041,6 +1041,7 @@
<ClInclude Include="..\ext\libzip\compat.h" />
<ClInclude Include="..\ext\libzip\config.h" />
<ClInclude Include="..\ext\libzip\zip.h" />
<ClInclude Include="..\ext\libzip\zipconf.h" />
<ClInclude Include="..\ext\libzip\zipint.h" />
<ClInclude Include="..\ext\libzip\zip_source_file.h" />
<ClInclude Include="..\ext\libzip\zip_source_file_stdio.h" />
+3
View File
@@ -1883,6 +1883,9 @@
<ClInclude Include="..\ext\libzip\compat.h">
<Filter>Ext\libzip</Filter>
</ClInclude>
<ClInclude Include="..\ext\libzip\zipconf.h">
<Filter>Ext\libzip</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="CMakeLists.txt" />
+10
View File
@@ -3,6 +3,14 @@
#ifndef _HAD_ZIPCONF_H
#include "zipconf.h"
#endif
#if defined(WINAPI_FAMILY) && defined(WINAPI_FAMILY_PARTITION)
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && WINAPI_FAMILY != WINAPI_FAMILY_DESKTOP_APP
#define MS_UWP
#define _WIN32_WINNT 0x0602
#endif
#endif
/* BEGIN DEFINES */
#ifdef _WIN32
#define HAVE__CLOSE
@@ -17,10 +25,12 @@
#define HAVE__UMASK
#define HAVE__UNLINK
#endif
#ifndef MS_UWP
#define HAVE_FILENO
#define HAVE_FSEEKO
#define HAVE_FTELLO
#define HAVE_GETPROGNAME
#endif
#ifndef _WIN32
#define HAVE_LOCALTIME_R
#define HAVE_MKSTEMP 1
+1 -1
View File
@@ -39,9 +39,9 @@
#ifndef HAVE_SECURE_RANDOM
#include <bcrypt.h>
#include <ntstatus.h>
#include <windows.h>
#include <bcrypt.h>
ZIP_EXTERN bool
zip_secure_random(zip_uint8_t *buffer, zip_uint16_t length) {
+5 -1
View File
@@ -81,6 +81,7 @@ utf16_allocate_tempname(const char *name, size_t extra_chars, size_t *lengthp) {
static HANDLE __stdcall
utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_ATTRIBUTES security_attributes, DWORD creation_disposition, DWORD file_attributes, HANDLE template_file) {
#ifdef MS_UWP
#if 0
CREATEFILE2_EXTENDED_PARAMETERS extParams = {0};
extParams.dwFileAttributes = file_attributes;
extParams.dwFileFlags = FILE_FLAG_RANDOM_ACCESS;
@@ -88,8 +89,11 @@ utf16_create_file(const char *name, DWORD access, DWORD share_mode, PSECURITY_AT
extParams.dwSize = sizeof(extParams);
extParams.hTemplateFile = template_file;
extParams.lpSecurityAttributes = security_attributes;
return CreateFile2((const wchar_t *)name, access, share_mode, creation_disposition, &extParams);
#else
return CreateFile2((const wchar_t *)name, access, share_mode, creation_disposition, NULL);
#endif
#else
return CreateFileW((const wchar_t *)name, access, share_mode, security_attributes, creation_disposition, file_attributes, template_file);
#endif