summaryrefslogtreecommitdiff
path: root/src/configfile.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-02-17 15:00:52 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2017-02-17 15:30:16 +0100
commit4363187d4e86c63d9465cbe7296d11fdc7815e32 (patch)
tree33005bd8183d74825b44bc4d47680faf7df009f0 /src/configfile.cc
parent70e08d1325b2cdd0e9c16a193cc6ed10d2d21617 (diff)
Replace obsolete WIN32 ifdefs with platform define.
Diffstat (limited to 'src/configfile.cc')
-rw-r--r--src/configfile.cc10
1 files changed, 6 insertions, 4 deletions
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 <sys/stat.h>
#include <sys/types.h>
-#ifdef WIN32
+#include "platform.h"
+
+#if DG_PLATFORM == DG_PLATFORM_WINDOWS
#include <direct.h>
#include <windows.h>
#include <Shlobj.h>
@@ -45,7 +47,7 @@
#include <hugin.hpp>
-#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