Permalink
Browse files

Merge pull request #340 from sgraham/fix-win-build

fix win32 compile, fix BuildLogTest.WriteRead on 2nd run
  • Loading branch information...
2 parents 5d8d27c + 98d1b7b commit 039b662d52b10f3a45accc40e3c269676c664f7c @evmar evmar committed Jul 17, 2012
Showing with 5 additions and 2 deletions.
  1. +2 −2 configure.py
  2. +1 −0 src/build_log.cc
  3. +2 −0 src/win32port.h
View
@@ -150,8 +150,8 @@ def binary(name):
def shell_escape(str):
"""Escape str such that it's interpreted as a single argument by the shell."""
# This isn't complete, but it's just enough to make NINJA_PYTHON work.
- # TODO: do the appropriate thing for Windows-style cmd here, perhaps by
- # just returning the input string.
+ if platform == 'windows':
+ return str
if '"' in str:
return "'%s'" % str.replace("'", "\\'")
return str
View
@@ -235,6 +235,7 @@ bool BuildLog::Load(const string& path, string* err) {
if (log_version < kOldestSupportedVersion) {
*err = "unable to extract version from build log, perhaps due to "
"being too old; you must clobber your build output and rebuild";
+ fclose(file);
return false;
}
}
View
@@ -15,6 +15,8 @@
#ifndef NINJA_WIN32PORT_H_
#define NINJA_WIN32PORT_H_
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
/// A 64-bit integer type
typedef signed long long int64_t;
typedef unsigned long long uint64_t;

0 comments on commit 039b662

Please sign in to comment.