summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2012-06-19 20:15:41 (GMT)
committerScott Graham <scottmg@chromium.org>2012-06-19 20:15:41 (GMT)
commit9ef56fd56f414bc6aa231b8d65cfa4ddec4cdedb (patch)
treed7c8a502cfd62150aad0fd3848b8995f9b8ace79
parentb3d63db1facc7ee9d14e211cc738f34b702de833 (diff)
downloadNinja-9ef56fd56f414bc6aa231b8d65cfa4ddec4cdedb.zip
Ninja-9ef56fd56f414bc6aa231b8d65cfa4ddec4cdedb.tar.gz
Ninja-9ef56fd56f414bc6aa231b8d65cfa4ddec4cdedb.tar.bz2
fix win32 compile, fix BuildLogTest.WriteRead on 2nd run
-rwxr-xr-xconfigure.py4
-rw-r--r--src/build_log_test.cc1
-rw-r--r--src/win32port.h2
3 files changed, 5 insertions, 2 deletions
diff --git a/configure.py b/configure.py
index 5329708..feb8a98 100755
--- a/configure.py
+++ b/configure.py
@@ -150,8 +150,8 @@ else:
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
diff --git a/src/build_log_test.cc b/src/build_log_test.cc
index 9fb42c9..8e73e6b 100644
--- a/src/build_log_test.cc
+++ b/src/build_log_test.cc
@@ -64,6 +64,7 @@ TEST_F(BuildLogTest, WriteRead) {
ASSERT_TRUE(*e1 == *e2);
ASSERT_EQ(15, e1->start_time);
ASSERT_EQ("out", e1->output);
+ log2.Close();
}
TEST_F(BuildLogTest, FirstWriteAddsSignature) {
diff --git a/src/win32port.h b/src/win32port.h
index 8b42b38..3799af1 100644
--- a/src/win32port.h
+++ b/src/win32port.h
@@ -16,6 +16,8 @@
#define NINJA_WIN32PORT_H_
#pragma once
+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;