Skip to content

Commit

Permalink
Merge pull request #340 from sgraham/fix-win-build
Browse files Browse the repository at this point in the history
fix win32 compile, fix BuildLogTest.WriteRead on 2nd run
  • Loading branch information
evmar committed Jul 17, 2012
2 parents 5d8d27c + 98d1b7b commit 039b662
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions configure.py
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/build_log.cc
Expand Up @@ -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;
}
}
Expand Down
2 changes: 2 additions & 0 deletions src/win32port.h
Expand Up @@ -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;
Expand Down

0 comments on commit 039b662

Please sign in to comment.