summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/chatlog.cpp4
-rw-r--r--src/client.cpp18
-rw-r--r--src/gui/setup_video.cpp4
-rw-r--r--src/log.cpp4
-rw-r--r--src/main.cpp4
-rw-r--r--src/main.h2
-rw-r--r--src/utils/copynpaste.cpp2
-rw-r--r--src/utils/mkdir.cpp8
-rw-r--r--src/utils/specialfolder.cpp2
-rw-r--r--src/utils/specialfolder.h2
10 files changed, 25 insertions, 25 deletions
diff --git a/src/chatlog.cpp b/src/chatlog.cpp
index f33b1aff..011fa3aa 100644
--- a/src/chatlog.cpp
+++ b/src/chatlog.cpp
@@ -29,7 +29,7 @@
#include <sys/types.h>
#include <sys/time.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#elif defined __APPLE__
#include <Carbon/Carbon.h>
@@ -167,7 +167,7 @@ void ChatLogger::setServerName(const std::string &serverName)
void ChatLogger::makeDir(const std::string &dir)
{
-#ifdef WIN32
+#ifdef _WIN32
mkdir(dir.c_str());
#else
mkdir(dir.c_str(), 0750);
diff --git a/src/client.cpp b/src/client.cpp
index 5736cec4..642d9376 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -86,7 +86,7 @@
#include <physfs.h>
#include <SDL_image.h>
-#ifdef WIN32
+#ifdef _WIN32
#include <SDL_syswm.h>
#include "utils/specialfolder.h"
#else
@@ -278,7 +278,7 @@ Client::Client(const Options &options):
std::string path = options.brandingPath;
// Strip blah.mana from the path
-#ifdef WIN32
+#ifdef _WIN32
int loc1 = path.find_last_of('/');
int loc2 = path.find_last_of('\\');
int loc = std::max(loc1, loc2);
@@ -297,14 +297,14 @@ Client::Client(const Options &options):
resman->addToSearchPath(mLocalDataDir, false);
std::string iconFile = branding.getValue("appIcon", "icons/mana");
-#ifdef WIN32
+#ifdef _WIN32
iconFile += ".ico";
#else
iconFile += ".png";
#endif
iconFile = resman->getPath(iconFile);
logger->log("Loading icon from file: %s", iconFile.c_str());
-#ifdef WIN32
+#ifdef _WIN32
static SDL_SysWMinfo pInfo;
SDL_GetWMInfo(&pInfo);
// Attempt to load icon from .ico file
@@ -1069,7 +1069,7 @@ void Client::action(const gcn::ActionEvent &event)
void Client::initRootDir()
{
mRootDir = PHYSFS_getBaseDir();
-#ifdef WIN32
+#ifdef _WIN32
std::string portableName = mRootDir + "portable.xml";
struct stat statbuf;
@@ -1135,7 +1135,7 @@ void Client::initHomeDir()
#elif defined __HAIKU__
mLocalDataDir = std::string(PHYSFS_getUserDir()) +
"/config/data/Mana";
-#elif defined WIN32
+#elif defined _WIN32
mLocalDataDir = getSpecialFolderLocation(CSIDL_LOCAL_APPDATA);
if (mLocalDataDir.empty())
mLocalDataDir = std::string(PHYSFS_getUserDir());
@@ -1163,7 +1163,7 @@ void Client::initHomeDir()
mConfigDir = std::string(PHYSFS_getUserDir()) +
"/config/settings/Mana" +
branding.getValue("appName", "manasource");
-#elif defined WIN32
+#elif defined _WIN32
mConfigDir = getSpecialFolderLocation(CSIDL_APPDATA);
if (mConfigDir.empty())
mConfigDir = mLocalDataDir;
@@ -1315,7 +1315,7 @@ void Client::initUpdatesDir()
{
if (!resman->mkdir("/" + mUpdatesDir))
{
-#if defined WIN32
+#if defined _WIN32
std::string newDir = mLocalDataDir + "\\" + mUpdatesDir;
std::string::size_type loc = newDir.find("/", 0);
@@ -1351,7 +1351,7 @@ void Client::initScreenshotDir()
}
else if (mScreenshotDir.empty())
{
-#ifdef WIN32
+#ifdef _WIN32
mScreenshotDir = getSpecialFolderLocation(CSIDL_MYPICTURES);
if (mScreenshotDir.empty())
mScreenshotDir = getSpecialFolderLocation(CSIDL_DESKTOP);
diff --git a/src/gui/setup_video.cpp b/src/gui/setup_video.cpp
index d72b402b..ea5dc140 100644
--- a/src/gui/setup_video.cpp
+++ b/src/gui/setup_video.cpp
@@ -301,7 +301,7 @@ void Setup_Video::apply()
* See http://libsdl.org/cgi/docwiki.cgi/SDL_SetVideoMode
*/
-#if defined(WIN32) || defined(__APPLE__)
+#if defined(_WIN32) || defined(__APPLE__)
// checks for opengl usage
if (!config.getBoolValue("opengl"))
{
@@ -327,7 +327,7 @@ void Setup_Video::apply()
logger->error(errorMessage.str());
}
}
-#if defined(WIN32) || defined(__APPLE__)
+#if defined(_WIN32) || defined(__APPLE__)
}
else
{
diff --git a/src/log.cpp b/src/log.cpp
index bb8a78bb..f430589b 100644
--- a/src/log.cpp
+++ b/src/log.cpp
@@ -21,7 +21,7 @@
#include "log.h"
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#elif __APPLE__
#include <Carbon/Carbon.h>
@@ -106,7 +106,7 @@ void Logger::log(const char *log_text, ...)
void Logger::error(const std::string &error_text)
{
log("Error: %s", error_text.c_str());
-#ifdef WIN32
+#ifdef _WIN32
MessageBox(NULL, error_text.c_str(), "Error", MB_ICONERROR | MB_OK);
#elif defined __APPLE__
Str255 msg;
diff --git a/src/main.cpp b/src/main.cpp
index 08ae4a8c..fccc4c9d 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -165,14 +165,14 @@ static void parseOptions(int argc, char *argv[], Client::Options &options)
}
}
-#ifdef WIN32
+#ifdef _WIN32
extern "C" char const *_nl_locale_name_default(void);
#endif
static void initInternationalization()
{
#if ENABLE_NLS
-#ifdef WIN32
+#ifdef _WIN32
SetEnvironmentVariable("LANG", _nl_locale_name_default());
// mingw doesn't like LOCALEDIR to be defined for some reason
bindtextdomain("mana", "translations/");
diff --git a/src/main.h b/src/main.h
index 82ece500..169ee7d1 100644
--- a/src/main.h
+++ b/src/main.h
@@ -52,7 +52,7 @@
#ifdef HAVE_CONFIG_H
#include "../config.h"
-#elif defined WIN32
+#elif defined _WIN32
#include "winver.h"
#elif defined __APPLE__
#define PACKAGE_VERSION "0.5.3"
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 3d2e3b80..458a6d27 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -35,7 +35,7 @@
#include <SDL_syswm.h>
#include "copynpaste.h"
-#ifdef WIN32
+#ifdef _WIN32
bool RetrieveBuffer(std::string& text, std::string::size_type& pos)
{
bool ret = false;
diff --git a/src/utils/mkdir.cpp b/src/utils/mkdir.cpp
index 75ab8595..ee40488e 100644
--- a/src/utils/mkdir.cpp
+++ b/src/utils/mkdir.cpp
@@ -22,7 +22,7 @@
#include <cstring>
#include <cerrno>
-#if defined WIN32
+#if defined _WIN32
#include <windows.h>
#endif
@@ -51,7 +51,7 @@ int mkdir_r(const char *pathname) {
}
for (p=tmp; *p; p++) {
-#if defined WIN32
+#if defined _WIN32
if (*p == '/' || *p == '\\')
#else
if (*p == '/')
@@ -77,13 +77,13 @@ int mkdir_r(const char *pathname) {
return -1;
}
-#if defined WIN32
+#if defined _WIN32
if (!CreateDirectory(tmp, 0))
#else
if (mkdir(tmp, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH))
#endif
{
-#if defined WIN32
+#if defined _WIN32
// hack, hack. just assume that x: might be a drive
// letter, and try again
if (!(strlen(tmp) == 2 &&
diff --git a/src/utils/specialfolder.cpp b/src/utils/specialfolder.cpp
index 63337578..0c82ce68 100644
--- a/src/utils/specialfolder.cpp
+++ b/src/utils/specialfolder.cpp
@@ -18,7 +18,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include "specialfolder.h"
#include <windows.h>
diff --git a/src/utils/specialfolder.h b/src/utils/specialfolder.h
index eef6416b..0c3e999c 100644
--- a/src/utils/specialfolder.h
+++ b/src/utils/specialfolder.h
@@ -21,7 +21,7 @@
#ifndef SPECIALFOLDER_H
#define SPECIALFOLDER_H
-#ifdef WIN32
+#ifdef _WIN32
#include <shlobj.h>
#include <string>
std::string getSpecialFolderLocation(int folderId);