summaryrefslogtreecommitdiff
path: root/src/fs/paths.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/fs/paths.cpp')
-rw-r--r--src/fs/paths.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/fs/paths.cpp b/src/fs/paths.cpp
index 897d2ff41..492f5a449 100644
--- a/src/fs/paths.cpp
+++ b/src/fs/paths.cpp
@@ -42,22 +42,22 @@
#define realpath(N, R) strcpy(R, N)
#endif // __native_client__
-#ifdef WIN32
+#ifdef _WIN32
#include "fs/specialfolder.h"
#define realpath(N, R) _fullpath((R), (N), _MAX_PATH)
-#endif
+#endif // _WIN32
#if defined __OpenBSD__
#include <limits>
#else
#include <climits>
-#endif // WIN32
+#endif // __OpenBSD__
-#ifndef WIN32
+#ifndef _WIN32
#include <unistd.h>
#include <sys/types.h>
#include <pwd.h>
-#endif // WIN32
+#endif // _WIN32
PRAGMA48(GCC diagnostic push)
PRAGMA48(GCC diagnostic ignored "-Wshadow")
@@ -148,7 +148,7 @@ void prepareFsPath(std::string &path)
std::string &fixDirSeparators(std::string &str)
{
-#ifdef WIN32
+#ifdef _WIN32
return replaceAll(str, "/", "\\");
#else
return str;
@@ -169,7 +169,7 @@ std::string removeLast(const std::string &str)
return str;
}
-#ifdef WIN32
+#ifdef _WIN32
std::string getSelfName()
{
return "manaplus.exe";
@@ -195,18 +195,18 @@ std::string getSelfName()
return "";
}
-#else // WIN32
+#else // _WIN32
std::string getSelfName()
{
return "";
}
-#endif // WIN32
+#endif // _WIN32
std::string getPicturesDir()
{
-#ifdef WIN32
+#ifdef _WIN32
std::string dir = getSpecialFolderLocation(CSIDL_MYPICTURES);
if (dir.empty())
dir = getSpecialFolderLocation(CSIDL_DESKTOP);
@@ -244,7 +244,7 @@ std::string getPicturesDir()
}
}
}
-#endif // WIN32
+#endif // _WIN32
return pathJoin(VirtFs::getUserDir(), "Desktop");
}
@@ -257,11 +257,11 @@ std::string getHomePath()
dir += dirSeparator;
return dir;
#else // defined(UNITTESTS) && defined(UNITESTSDIR)
-#ifdef WIN32
+#ifdef _WIN32
return getSpecialFolderLocation(CSIDL_LOCAL_APPDATA);
#elif defined(__SWITCH__)
return VirtFs::getBaseDir();
-#else
+#else // _WIN32
const char *path = getenv("HOME");
if (path == nullptr)
{
@@ -279,7 +279,7 @@ std::string getHomePath()
if (findLast(dir, std::string(dirSeparator)) == false)
dir += dirSeparator;
return dir;
-#endif // WIN32
+#endif // _WIN32
#endif // defined(UNITTESTS) && defined(UNITESTSDIR)
}