diff options
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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_ |