*: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized and may be missing. Closes #169
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#include "config.h"
|
||||
|
||||
// Use X Desktop guidelines where applicable
|
||||
#if !defined(__APPLE__) && !defined(WIN32) && !defined(ANDROID)
|
||||
#if !defined(__APPLE__) && !defined(_WIN32) && !defined(ANDROID)
|
||||
#define USE_XDG
|
||||
#endif
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include <array>
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#else
|
||||
@@ -53,7 +53,7 @@
|
||||
#include "Main.hxx"
|
||||
#endif
|
||||
|
||||
#if !defined(WIN32) && !defined(ANDROID)
|
||||
#if !defined(_WIN32) && !defined(ANDROID)
|
||||
class PasswdEntry
|
||||
{
|
||||
#if defined(HAVE_GETPWNAM_R) || defined(HAVE_GETPWUID_R)
|
||||
@@ -113,7 +113,7 @@ SafePathFromFS(PathTraitsFS::const_pointer_type dir)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
static AllocatedPath GetStandardDir(int folder_id)
|
||||
{
|
||||
std::array<PathTraitsFS::value_type, MAX_PATH> dir;
|
||||
@@ -226,7 +226,7 @@ try {
|
||||
AllocatedPath
|
||||
GetUserConfigDir() noexcept
|
||||
{
|
||||
#if defined(WIN32)
|
||||
#if defined(_WIN32)
|
||||
return GetStandardDir(CSIDL_LOCAL_APPDATA);
|
||||
#elif defined(USE_XDG)
|
||||
// Check for $XDG_CONFIG_HOME
|
||||
@@ -251,7 +251,7 @@ GetUserConfigDir() noexcept
|
||||
AllocatedPath
|
||||
GetUserMusicDir() noexcept
|
||||
{
|
||||
#if defined(WIN32)
|
||||
#if defined(_WIN32)
|
||||
return GetStandardDir(CSIDL_MYMUSIC);
|
||||
#elif defined(USE_XDG)
|
||||
return GetUserDir("XDG_MUSIC_DIR");
|
||||
@@ -287,7 +287,7 @@ GetUserCacheDir() noexcept
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|
||||
AllocatedPath
|
||||
GetSystemConfigDir() noexcept
|
||||
|
Reference in New Issue
Block a user