diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:17 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:17 +0300 |
commit | d3a398281c6fd1d3672036cb2d63f842d2cb28c5 (patch) | |
tree | dd4bd3ca0f36b817e96812825ffaf10d645803f2 /util/system/compat.cpp | |
parent | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (diff) | |
download | ydb-d3a398281c6fd1d3672036cb2d63f842d2cb28c5.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 2 of 2.
Diffstat (limited to 'util/system/compat.cpp')
-rw-r--r-- | util/system/compat.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/util/system/compat.cpp b/util/system/compat.cpp index 8342e76983..18fbfa296a 100644 --- a/util/system/compat.cpp +++ b/util/system/compat.cpp @@ -1,26 +1,26 @@ -#include "compat.h" -#include "defaults.h" -#include "progname.h" - +#include "compat.h" +#include "defaults.h" +#include "progname.h" + #include <cctype> #include <cerrno> #include <cstdio> -#include <cstring> +#include <cstring> #include <cstdarg> #include <cstdlib> #include <util/generic/string.h> #ifdef _win_ - #include "winint.h" - #include <io.h> + #include "winint.h" + #include <io.h> #endif #ifndef HAVE_NATIVE_GETPROGNAME const char* getprogname() { return GetProgramName().data(); } -#endif +#endif #ifdef _win_ @@ -32,11 +32,11 @@ void usleep(i64 len) { Sleep((unsigned long)len / 1000); } - #include <fcntl.h> -int ftruncate(int fd, i64 length) { + #include <fcntl.h> +int ftruncate(int fd, i64 length) { return _chsize_s(fd, length); } -int truncate(const char* name, i64 length) { +int truncate(const char* name, i64 length) { int fd = ::_open(name, _O_WRONLY); int ret = ftruncate(fd, length); ::close(fd); |