aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorkakabba <kakabba@yandex-team.ru>2022-02-10 16:46:04 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:04 +0300
commit9c914f41ba5e9f9365f404e892197553ac23809e (patch)
tree1a2c5ffcf89eb53ecd79dbc9bc0a195c27404d0c /util
parentc8e3995898c443e78266f7420aac5fb3da15d413 (diff)
downloadydb-9c914f41ba5e9f9365f404e892197553ac23809e.tar.gz
Restoring authorship annotation for <kakabba@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r--util/folder/dirut.cpp14
-rw-r--r--util/folder/path.cpp24
-rw-r--r--util/folder/path.h4
-rw-r--r--util/folder/path_ut.cpp4
-rw-r--r--util/network/sock.h8
-rw-r--r--util/system/context_aarch64.S24
-rw-r--r--util/system/platform.h4
-rw-r--r--util/system/tls.h2
-rw-r--r--util/system/types.h8
-rw-r--r--util/ya.make2
10 files changed, 47 insertions, 47 deletions
diff --git a/util/folder/dirut.cpp b/util/folder/dirut.cpp
index 1c261c9dd7..ffc9b09f96 100644
--- a/util/folder/dirut.cpp
+++ b/util/folder/dirut.cpp
@@ -399,9 +399,9 @@ int mkpath(char* path, int mode) {
return NFs::MakeDirectoryRecursive(path, NFs::EFilePermission(mode)) ? 0 : -1;
}
-// Implementation of realpath in FreeBSD (version 9.0 and less) and GetFullPathName in Windows
-// did not require last component of the file name to exist (other implementations will fail
-// if it does not). Use RealLocation if that behaviour is required.
+// Implementation of realpath in FreeBSD (version 9.0 and less) and GetFullPathName in Windows
+// did not require last component of the file name to exist (other implementations will fail
+// if it does not). Use RealLocation if that behaviour is required.
TString RealPath(const TString& path) {
TTempBuf result;
Y_ASSERT(result.Size() > MAX_PATH); //TMP_BUF_LEN > MAX_PATH
@@ -416,13 +416,13 @@ TString RealPath(const TString& path) {
TString RealLocation(const TString& path) {
if (NFs::Exists(path))
- return RealPath(path);
+ return RealPath(path);
TString dirpath = GetDirName(path);
if (NFs::Exists(dirpath))
return RealPath(dirpath) + GetDirectorySeparatorS() + GetFileNameComponent(path.data());
- ythrow TFileError() << "RealLocation failed \"" << path << "\"";
-}
-
+ ythrow TFileError() << "RealLocation failed \"" << path << "\"";
+}
+
int MakeTempDir(char path[/*FILENAME_MAX*/], const char* prefix) {
int ret;
diff --git a/util/folder/path.cpp b/util/folder/path.cpp
index c8f440d669..bfe0c67d68 100644
--- a/util/folder/path.cpp
+++ b/util/folder/path.cpp
@@ -77,29 +77,29 @@ TFsPath TFsPath::RelativeTo(const TFsPath& root) const {
return TFsPath(split.Reconstruct());
}
-TFsPath TFsPath::RelativePath(const TFsPath& root) const {
- TSplit split = GetSplit();
- const TSplit& rsplit = root.GetSplit();
- size_t cnt = 0;
+TFsPath TFsPath::RelativePath(const TFsPath& root) const {
+ TSplit split = GetSplit();
+ const TSplit& rsplit = root.GetSplit();
+ size_t cnt = 0;
while (split.size() > cnt && rsplit.size() > cnt && split[cnt] == rsplit[cnt]) {
++cnt;
}
bool absboth = split.IsAbsolute && rsplit.IsAbsolute;
if (cnt == 0 && !absboth) {
- ythrow TIoException() << "No common parts in " << *this << " and " << root;
+ ythrow TIoException() << "No common parts in " << *this << " and " << root;
}
TString r;
for (size_t i = 0; i < rsplit.size() - cnt; i++) {
- r += i == 0 ? ".." : "/..";
+ r += i == 0 ? ".." : "/..";
}
for (size_t i = cnt; i < split.size(); i++) {
r += (i == 0 || i == cnt && rsplit.size() - cnt == 0 ? "" : "/");
r += split[i];
}
return r.size() ? TFsPath(r) : TFsPath();
-}
-
+}
+
TFsPath TFsPath::Parent() const {
if (!IsDefined()) {
return TFsPath();
@@ -314,11 +314,11 @@ TFsPath TFsPath::RealPath() const {
return ::RealPath(*this);
}
-TFsPath TFsPath::RealLocation() const {
- CheckDefined();
+TFsPath TFsPath::RealLocation() const {
+ CheckDefined();
return ::RealLocation(*this);
-}
-
+}
+
TFsPath TFsPath::ReadLink() const {
CheckDefined();
diff --git a/util/folder/path.h b/util/folder/path.h
index 68a03bd85e..2fb4d6b4ef 100644
--- a/util/folder/path.h
+++ b/util/folder/path.h
@@ -119,7 +119,7 @@ public:
/**
* @returns relative path or empty path if root equals to this.
*/
- TFsPath RelativePath(const TFsPath& root) const; //..; for relative paths 1st component must be the same
+ TFsPath RelativePath(const TFsPath& root) const; //..; for relative paths 1st component must be the same
/**
* Never fails. Returns this if already a root.
@@ -191,7 +191,7 @@ public:
void Touch() const;
TFsPath RealPath() const;
- TFsPath RealLocation() const;
+ TFsPath RealLocation() const;
TFsPath ReadLink() const;
/// always absolute
diff --git a/util/folder/path_ut.cpp b/util/folder/path_ut.cpp
index 1d6ce221aa..e6a3451016 100644
--- a/util/folder/path_ut.cpp
+++ b/util/folder/path_ut.cpp
@@ -266,7 +266,7 @@ Y_UNIT_TEST_SUITE(TFsPathTests) {
Y_UNIT_TEST(Cwd) {
UNIT_ASSERT_VALUES_EQUAL(TFsPath::Cwd().RealPath(), TFsPath(".").RealPath());
}
-
+
Y_UNIT_TEST(TestSubpathOf) {
UNIT_ASSERT(TFsPath("/a/b/c/d").IsSubpathOf("/a/b"));
@@ -344,7 +344,7 @@ Y_UNIT_TEST_SUITE(TFsPathTests) {
UNIT_ASSERT_EXCEPTION(TFsPath("a/b/c").RelativePath(TFsPath("d/e")), TIoException);
}
-
+
Y_UNIT_TEST(TestUndefined) {
UNIT_ASSERT_VALUES_EQUAL(TFsPath(), TFsPath(""));
UNIT_ASSERT_VALUES_EQUAL(TFsPath(), TFsPath().Fix());
diff --git a/util/network/sock.h b/util/network/sock.h
index 5db2ee1091..b10be2f715 100644
--- a/util/network/sock.h
+++ b/util/network/sock.h
@@ -251,10 +251,10 @@ struct TSockAddrInet: public sockaddr_in, public ISockAddr {
if (ret < 0)
return -errno;
- socklen_t len = Len();
- if (getsockname(s, (struct sockaddr*)(SockAddr()), &len) < 0)
- return -WSAGetLastError();
-
+ socklen_t len = Len();
+ if (getsockname(s, (struct sockaddr*)(SockAddr()), &len) < 0)
+ return -WSAGetLastError();
+
return 0;
}
diff --git a/util/system/context_aarch64.S b/util/system/context_aarch64.S
index e88f6d150f..0b2ef4e4a6 100644
--- a/util/system/context_aarch64.S
+++ b/util/system/context_aarch64.S
@@ -1,12 +1,12 @@
.p2align 2
-#if !(defined __darwin__) && !(defined __arm64__)
+#if !(defined __darwin__) && !(defined __arm64__)
.global __mysetjmp
.type __mysetjmp,@function
-__mysetjmp:
-#else
-.global ___mysetjmp
-___mysetjmp:
-#endif
+__mysetjmp:
+#else
+.global ___mysetjmp
+___mysetjmp:
+#endif
// IHI0055B_aapcs64.pdf 5.1.1, 5.1.2 callee saved registers
stp x19, x20, [x0,#0]
stp x21, x22, [x0,#16]
@@ -24,14 +24,14 @@ ___mysetjmp:
ret
.p2align 2
-#if !(defined __darwin__) && !(defined __arm64__)
+#if !(defined __darwin__) && !(defined __arm64__)
.global __mylongjmp
.type __mylongjump,@function
-__mylongjmp:
-#else
-.global ___mylongjmp
-___mylongjmp:
-#endif
+__mylongjmp:
+#else
+.global ___mylongjmp
+___mylongjmp:
+#endif
// IHI0055B_aapcs64.pdf 5.1.1, 5.1.2 callee saved registers
ldp x19, x20, [x0,#0]
ldp x21, x22, [x0,#16]
diff --git a/util/system/platform.h b/util/system/platform.h
index bfa68216a4..58f310ab34 100644
--- a/util/system/platform.h
+++ b/util/system/platform.h
@@ -93,8 +93,8 @@
#if defined(__i386__) || defined(_M_IX86)
#define _i386_
-#endif
-
+#endif
+
#if defined(__ia64__) || defined(_M_IA64)
#define _ia64_
#endif
diff --git a/util/system/tls.h b/util/system/tls.h
index 8f5efdfe34..3c4f56dbeb 100644
--- a/util/system/tls.h
+++ b/util/system/tls.h
@@ -9,7 +9,7 @@
#if defined(_darwin_)
#define Y_DISABLE_THRKEY_OPTIMIZATION
-#endif
+#endif
#if defined(_arm_) && defined(_linux_)
#define Y_DISABLE_THRKEY_OPTIMIZATION
diff --git a/util/system/types.h b/util/system/types.h
index 66064082ac..12e68a6060 100644
--- a/util/system/types.h
+++ b/util/system/types.h
@@ -22,13 +22,13 @@ typedef uint32_t ui32;
typedef int32_t i32;
#endif
-#if defined(_darwin_) && defined(_64_)
-typedef unsigned long ui64;
+#if defined(_darwin_) && defined(_64_)
+typedef unsigned long ui64;
typedef long i64;
-#else
+#else
typedef uint64_t ui64;
typedef int64_t i64;
-#endif
+#endif
#define LL(number) INT64_C(number)
#define ULL(number) UINT64_C(number)
diff --git a/util/ya.make b/util/ya.make
index d41cd64324..6ebe7e40cf 100644
--- a/util/ya.make
+++ b/util/ya.make
@@ -340,7 +340,7 @@ ELSE()
system/context_x86.asm
)
ENDIF()
- IF (ARCH_AARCH64 OR ARCH_ARM64)
+ IF (ARCH_AARCH64 OR ARCH_ARM64)
SRCS(
system/context_aarch64.S
)