diff options
author | Nico Weber <nicolasweber@gmx.de> | 2015-08-10 15:35:33 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2015-08-10 15:35:33 (GMT) |
commit | 30d1d7b8da64ff5f32b46aa704f9fbc324c71949 (patch) | |
tree | 08be2bf79a4ab46b064eedbd2055821f6f640917 | |
parent | ddc1777449208ace6f494277c329ebd84671f4b5 (diff) | |
parent | 956b4f1bc4f276325fd3ad8670be6bc9c9804fb9 (diff) | |
download | Ninja-30d1d7b8da64ff5f32b46aa704f9fbc324c71949.zip Ninja-30d1d7b8da64ff5f32b46aa704f9fbc324c71949.tar.gz Ninja-30d1d7b8da64ff5f32b46aa704f9fbc324c71949.tar.bz2 |
Merge pull request #1003 from sgraham/2015-compile
Fix compile on VS2015
-rwxr-xr-x | configure.py | 1 | ||||
-rw-r--r-- | src/graphviz.h | 5 | ||||
-rw-r--r-- | src/ninja.cc | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/configure.py b/configure.py index 7413659..b8d7096 100755 --- a/configure.py +++ b/configure.py @@ -297,6 +297,7 @@ if platform.is_msvc(): # We never have strings or arrays larger than 2**31. '/wd4267', '/DNOMINMAX', '/D_CRT_SECURE_NO_WARNINGS', + '/D_HAS_EXCEPTIONS=0', '/DNINJA_PYTHON="%s"' % options.with_python] if options.bootstrap: # In bootstrap mode, we have no ninja process to catch /showIncludes diff --git a/src/graphviz.h b/src/graphviz.h index 1e2a29d..408496d 100644 --- a/src/graphviz.h +++ b/src/graphviz.h @@ -16,7 +16,6 @@ #define NINJA_GRAPHVIZ_H_ #include <set> -using namespace std; struct Node; struct Edge; @@ -27,8 +26,8 @@ struct GraphViz { void AddTarget(Node* node); void Finish(); - set<Node*> visited_nodes_; - set<Edge*> visited_edges_; + std::set<Node*> visited_nodes_; + std::set<Edge*> visited_edges_; }; #endif // NINJA_GRAPHVIZ_H_ diff --git a/src/ninja.cc b/src/ninja.cc index 3756123..a3d963f 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -1156,7 +1156,7 @@ int main(int argc, char** argv) { #if defined(_MSC_VER) // Set a handler to catch crashes not caught by the __try..__except // block (e.g. an exception in a stack-unwind-block). - set_terminate(TerminateHandler); + std::set_terminate(TerminateHandler); __try { // Running inside __try ... __except suppresses any Windows error // dialogs for errors such as bad_alloc. |