summaryrefslogtreecommitdiffstats
path: root/src/util.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.h')
-rw-r--r--src/util.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/util.h b/src/util.h
index bfcbfa8..3a658fb 100644
--- a/src/util.h
+++ b/src/util.h
@@ -39,9 +39,10 @@ void Error(const char* msg, ...);
/// Canonicalize a path like "foo/../bar.h" into just "bar.h".
bool CanonicalizePath(string* path, string* err);
-bool CanonicalizePath(char* path, int* len, string* err);
+bool CanonicalizePath(char* path, size_t* len, string* err);
-/// Read a file to a string.
+/// Read a file to a string (in text mode: with CRLF conversion
+/// on Windows).
/// Returns -errno and fills in \a err on error.
int ReadFile(const string& path, string* contents, string* err);
@@ -81,6 +82,9 @@ string ElideMiddle(const string& str, size_t width);
#ifdef _WIN32
/// Convert the value returned by GetLastError() into a string.
string GetLastErrorString();
+
+/// Calls Fatal() with a function name and GetLastErrorString.
+void Win32Fatal(const char* function);
#endif
#endif // NINJA_UTIL_H_