summaryrefslogtreecommitdiff
path: root/src/configfile.cc
diff options
context:
space:
mode:
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