From 5620dc52a2810c03e435a247401f8017627c7f43 Mon Sep 17 00:00:00 2001 From: Natalia Portillo Date: Wed, 7 Apr 2021 01:52:23 +0100 Subject: [PATCH] Add missing definitions for old 32-bit Windows compilers. --- setter/src/win32/attr.h | 4 ++++ setter/src/win32/sparse.h | 4 ++++ setter/src/win32/win32.h | 5 +++-- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/setter/src/win32/attr.h b/setter/src/win32/attr.h index f6f6e55..9cf8bea 100644 --- a/setter/src/win32/attr.h +++ b/setter/src/win32/attr.h @@ -29,6 +29,10 @@ Copyright (C) 2011-2021 Natalia Portillo #include "win32.h" +#ifndef FILE_ATTRIBUTE_OFFLINE +#define FILE_ATTRIBUTE_OFFLINE 0x1000 +#endif + const char* compressedAttributeText = "This file is compressed.\n"; typedef struct diff --git a/setter/src/win32/sparse.h b/setter/src/win32/sparse.h index 3fcb382..aeee1f8 100644 --- a/setter/src/win32/sparse.h +++ b/setter/src/win32/sparse.h @@ -46,4 +46,8 @@ typedef struct _WINNT_FILE_ZERO_DATA_INFORMATION LARGE_INTEGER BeyondFinalZero; } WINNT_FILE_ZERO_DATA_INFORMATION, *PWINNT_FILE_ZERO_DATA_INFORMATION; +#ifndef FILE_SUPPORTS_SPARSE_FILES +#define FILE_SUPPORTS_SPARSE_FILES 0x0000040 +#endif + #endif // AARU_FSTESTER_SETTER_SRC_WIN32_SPARSE_H_ diff --git a/setter/src/win32/win32.h b/setter/src/win32/win32.h index b0f20cc..b34b49c 100644 --- a/setter/src/win32/win32.h +++ b/setter/src/win32/win32.h @@ -23,7 +23,7 @@ Copyright (C) 2011-2021 Natalia Portillo *****************************************************************************/ #pragma clang diagnostic push -#pragma ide diagnostic ignored "bugprone-reserved-identifier" +#pragma ide diagnostic ignored "bugprone-reserved-identifier" #ifndef AARU_FSTESTER_SETTER_SRC_WIN32_H #define AARU_FSTESTER_SETTER_SRC_WIN32_H @@ -55,7 +55,8 @@ static BOOL(WINAPI* WinGetVersionExA)(WIN_LPOSVERSIONINFOA); static DWORD dwMaxNameSize = MAX_PATH + 1; static DWORD dwFilePermissions = GENERIC_READ | GENERIC_WRITE; -#if defined(__aarch64__) || defined(_M_ARM64) || defined(__ia64__) || defined(_M_IA64) || defined(__x86_64__) || defined(__amd64) || defined(_M_AMD64) || defined(_M_X64) +#if defined(__aarch64__) || defined(_M_ARM64) || defined(__ia64__) || defined(_M_IA64) || defined(__x86_64__) || \ + defined(__amd64) || defined(_M_AMD64) || defined(_M_X64) #define SIZE_T_FORMAT "%llu" #else #define SIZE_T_FORMAT "%u"