Fix compile with -ansi on windows.
This commit is contained in:
parent
4415cf4a51
commit
16281bac17
3 changed files with 6 additions and 5 deletions
|
@ -311,8 +311,6 @@ builds = {
|
|||
"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])
|
||||
|
|
|
@ -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 @@ static void wesnoth_setlocale(int category, std::string const &slocale,
|
|||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
const std::string env = "LANG=" + slocale;
|
||||
putenv(env.c_str());
|
||||
SetEnvironmentVariable("LANG", slocale.c_str());
|
||||
#endif
|
||||
|
||||
#ifdef USE_DUMMYLOCALES
|
||||
|
|
|
@ -1773,7 +1773,7 @@ int main(int argc, char** argv) {
|
|||
<< "\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
|
||||
|
|
Loading…
Add table
Reference in a new issue