diff options
author | Nico Weber <nicolasweber@gmx.de> | 2013-04-29 15:57:31 (GMT) |
---|---|---|
committer | Nico Weber <nicolasweber@gmx.de> | 2013-04-29 16:01:55 (GMT) |
commit | bb10325339898d2833a9f24e9e0252b2c257beb1 (patch) | |
tree | 7f78186d78e2e060a26ece346129aba9015d3515 /src/util.h | |
parent | 3699cb6aa2fb29125bf725cb50fbcc593da8a8a1 (diff) | |
download | Ninja-bb10325339898d2833a9f24e9e0252b2c257beb1.zip Ninja-bb10325339898d2833a9f24e9e0252b2c257beb1.tar.gz Ninja-bb10325339898d2833a9f24e9e0252b2c257beb1.tar.bz2 |
Introduce a Truncate() function that works on POSIX and Windows.
Hopefully fixes the build on Windows.
Diffstat (limited to 'src/util.h')
-rw-r--r-- | src/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -76,6 +76,9 @@ double GetLoadAverage(); /// exceeds @a width. string ElideMiddle(const string& str, size_t width); +/// Truncates a file to the given size. +bool Truncate(const string& path, size_t size, string* err); + #ifdef _MSC_VER #define snprintf _snprintf #define fileno _fileno |