From c65713b340b79b2aa3053534c8c9faf648431160 Mon Sep 17 00:00:00 2001 From: Martijn van Beurden Date: Mon, 19 Sep 2022 20:20:27 +0200 Subject: Define WINAPI_FAMILY stuff on platforms that do not provide them --- src/share/grabbag/file.c | 4 ++++ src/share/win_utf8_io/win_utf8_io.c | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/src/share/grabbag/file.c b/src/share/grabbag/file.c index 479a2e97..1a781526 100644 --- a/src/share/grabbag/file.c +++ b/src/share/grabbag/file.c @@ -125,6 +125,10 @@ FLAC__bool grabbag__file_change_stats(const char *filename, FLAC__bool read_only FLAC__bool grabbag__file_are_same(const char *f1, const char *f2) { #if defined _WIN32 && !defined __CYGWIN__ +#if !defined(WINAPI_FAMILY_PARTITION) +#define WINAPI_FAMILY_PARTITION(x) x +#define WINAPI_PARTITION_DESKTOP 1 +#endif /* see * http://www.hydrogenaudio.org/forums/index.php?showtopic=49439&pid=444300&st=0 * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/getfileinformationbyhandle.asp diff --git a/src/share/win_utf8_io/win_utf8_io.c b/src/share/win_utf8_io/win_utf8_io.c index a133254d..65b56997 100644 --- a/src/share/win_utf8_io/win_utf8_io.c +++ b/src/share/win_utf8_io/win_utf8_io.c @@ -39,6 +39,11 @@ #define UTF8_BUFFER_SIZE 32768 +#if !defined(WINAPI_FAMILY_PARTITION) +#define WINAPI_FAMILY_PARTITION(x) x +#define WINAPI_PARTITION_DESKTOP 1 +#endif + static int local_vsnprintf(char *str, size_t size, const char *fmt, va_list va) { int rc; -- cgit v1.2.1