summaryrefslogtreecommitdiffstats
path: root/util/system/compat.cpp
diff options
context:
space:
mode:
authordenplusplus <[email protected]>2022-02-10 16:47:34 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:47:34 +0300
commit57c20d143e8a438cd76b9fdc3ca2e8ee3ac1f32a (patch)
treecc63639f8e502db19a82c20e2861c6d1edbf9fea /util/system/compat.cpp
parent464ba3814a83db4f2d5327393b0b6eaf0c86bfd7 (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'util/system/compat.cpp')
-rw-r--r--util/system/compat.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/util/system/compat.cpp b/util/system/compat.cpp
index 18fbfa296a7..b6e178d5d7f 100644
--- a/util/system/compat.cpp
+++ b/util/system/compat.cpp
@@ -11,18 +11,18 @@
#include <util/generic/string.h>
-#ifdef _win_
+#ifdef _win_
#include "winint.h"
#include <io.h>
-#endif
-
+#endif
+
#ifndef HAVE_NATIVE_GETPROGNAME
const char* getprogname() {
return GetProgramName().data();
}
#endif
-#ifdef _win_
+#ifdef _win_
void sleep(i64 len) {
Sleep((unsigned long)len * 1000);
@@ -35,11 +35,11 @@ void usleep(i64 len) {
#include <fcntl.h>
int ftruncate(int fd, i64 length) {
return _chsize_s(fd, length);
-}
+}
int truncate(const char* name, i64 length) {
int fd = ::_open(name, _O_WRONLY);
int ret = ftruncate(fd, length);
::close(fd);
return ret;
}
-#endif
+#endif