summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorScott Graham <sgraham@gmail.com>2012-01-04 01:04:49 (GMT)
committerEvan Martin <martine@danga.com>2012-01-04 01:04:49 (GMT)
commit6d338066d09b825aa18f453090333d477e2a9a06 (patch)
tree9b756cb905f1365daefe9fd40a0c59bf89108f42 /src
parentd0742f5635c6f5f998a7dce4991e51a0956c4cb1 (diff)
downloadNinja-6d338066d09b825aa18f453090333d477e2a9a06.zip
Ninja-6d338066d09b825aa18f453090333d477e2a9a06.tar.gz
Ninja-6d338066d09b825aa18f453090333d477e2a9a06.tar.bz2
windows: make bootstrap.py/configure.py work with MSVC
Diffstat (limited to 'src')
-rw-r--r--src/disk_interface.cc2
-rw-r--r--src/getopt.c4
-rw-r--r--src/util.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index 4227f8f..dec3836 100644
--- a/src/disk_interface.cc
+++ b/src/disk_interface.cc
@@ -84,7 +84,7 @@ int RealDiskInterface::Stat(const std::string& path) {
((uint64_t)filetime.dwLowDateTime);
mtime /= 1000000000LL / 100; // 100ns -> s.
mtime -= 12622770400LL; // 1600 epoch -> 2000 epoch (subtract 400 years).
- return mtime;
+ return (int)mtime;
#else
struct stat st;
if (stat(path.c_str(), &st) < 0) {
diff --git a/src/getopt.c b/src/getopt.c
index 177e503..0dbe6a5 100644
--- a/src/getopt.c
+++ b/src/getopt.c
@@ -91,6 +91,10 @@ gpietsch@comcast.net
#include "getopt.h"
#endif
+#ifdef _WIN32
+#pragma warning(disable: 4701)
+#endif
+
/* macros */
/* types */
diff --git a/src/util.h b/src/util.h
index 58e0b85..69bf80c 100644
--- a/src/util.h
+++ b/src/util.h
@@ -61,6 +61,8 @@ const char* SpellcheckString(const string& text, ...);
#ifdef _WIN32
#define snprintf _snprintf
+#define fileno _fileno
+#define unlink _unlink
/// Convert the value returned by GetLastError() into a string.
string GetLastErrorString();