Define WINAPI_FAMILY stuff on platforms that do not provide them

This commit is contained in:
Martijn van Beurden 2022-09-19 20:20:27 +02:00
parent 7dfcd73350
commit c65713b340
2 changed files with 9 additions and 0 deletions

View File

@ -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

View File

@ -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;