Author: loonycyborg
Date: Wed Jun 11 14:20:59 2008
New Revision: 27101

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27101&view=rev
Log:
Fix compile with -ansi on windows.

Modified:
    trunk/SConstruct
    trunk/src/language.cpp
    trunk/src/server/server.cpp

Modified: trunk/SConstruct
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/SConstruct?rev=27101&r1=27100&r2=27101&view=diff
==============================================================================
--- trunk/SConstruct (original)
+++ trunk/SConstruct Wed Jun 11 14:20:59 2008
@@ -311,8 +311,6 @@
     "release" : dict(CXXFLAGS = Split("-O2 -ansi")),
     "profile" : dict(CXXFLAGS = "-pg", LINKFLAGS = "-pg")
     }
-if sys.platform == "win32":
-    builds["release"] = {} # Both -O2 and -ansi cause Bad Things to happen on 
windows
 build = env["build"]
 
 env.AppendUnique(**builds[build])

Modified: trunk/src/language.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/language.cpp?rev=27101&r1=27100&r2=27101&view=diff
==============================================================================
--- trunk/src/language.cpp (original)
+++ trunk/src/language.cpp Wed Jun 11 14:20:59 2008
@@ -38,6 +38,10 @@
 #include <iostream>
 #include <stdexcept>
 
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
 /** Tests one locale to be available. */
 static bool has_locale(const char* s) {
        try {
@@ -192,8 +196,7 @@
 #endif
 
 #ifdef _WIN32
-       const std::string env = "LANG=" + slocale;
-       putenv(env.c_str());
+       SetEnvironmentVariable("LANG", slocale.c_str());
 #endif
 
 #ifdef USE_DUMMYLOCALES

Modified: trunk/src/server/server.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/server/server.cpp?rev=27101&r1=27100&r2=27101&view=diff
==============================================================================
--- trunk/src/server/server.cpp (original)
+++ trunk/src/server/server.cpp Wed Jun 11 14:20:59 2008
@@ -1773,7 +1773,7 @@
                                << "\n";
                        return 0;
                } else if (val == "--daemon" || val == "-d") {
-#ifdef WIN32
+#ifdef _WIN32
                        ERR_SERVER << "Running as a daemon is not supported on 
this platform\n";
                        return -1;
 #else


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to