From 4363187d4e86c63d9465cbe7296d11fdc7815e32 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 17 Feb 2017 15:00:52 +0100 Subject: Replace obsolete WIN32 ifdefs with platform define. --- src/configfile.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/configfile.cc') diff --git a/src/configfile.cc b/src/configfile.cc index 24f9deb..71496a0 100644 --- a/src/configfile.cc +++ b/src/configfile.cc @@ -35,7 +35,9 @@ #include #include -#ifdef WIN32 +#include "platform.h" + +#if DG_PLATFORM == DG_PLATFORM_WINDOWS #include #include #include @@ -45,7 +47,7 @@ #include -#ifdef WIN32 +#if DG_PLATFORM == DG_PLATFORM_WINDOWS #define SEP "\\" #else #define SEP "/" @@ -58,7 +60,7 @@ */ static std::string getConfigPath() { -#ifdef WIN32 +#if DG_PLATFORM == DG_PLATFORM_WINDOWS std::string configpath; TCHAR szPath[256]; if(SUCCEEDED(SHGetFolderPath( @@ -87,7 +89,7 @@ static bool createConfigPath() { DEBUG(configfile, "No configuration exists, creating directory '%s'\n", configpath.c_str()); -#ifdef WIN32 +#if DG_PLATFORM == DG_PLATFORM_WINDOWS if(mkdir(configpath.c_str()) < 0) { #else -- cgit v1.2.3