aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/c_templates
diff options
context:
space:
mode:
authordvshkurko <dvshkurko@yandex-team.ru>2022-02-10 16:45:51 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:51 +0300
commit321ee9bce31ec6e238be26dbcbe539cffa2c3309 (patch)
tree14407a2757cbf29eb97e266b7f07e851f971000c /build/scripts/c_templates
parent2f6ca198245aeffd5e2d82b65927c2465b68b4f5 (diff)
downloadydb-321ee9bce31ec6e238be26dbcbe539cffa2c3309.tar.gz
Restoring authorship annotation for <dvshkurko@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/scripts/c_templates')
-rw-r--r--build/scripts/c_templates/svn_interface.c314
-rw-r--r--build/scripts/c_templates/svnversion.h78
-rw-r--r--build/scripts/c_templates/ya.make10
3 files changed, 201 insertions, 201 deletions
diff --git a/build/scripts/c_templates/svn_interface.c b/build/scripts/c_templates/svn_interface.c
index d8bdd1a70d..45cb2b09b5 100644
--- a/build/scripts/c_templates/svn_interface.c
+++ b/build/scripts/c_templates/svn_interface.c
@@ -1,79 +1,79 @@
-// Used indirectly. See build/scripts/vcs_info.py
-// ya-bin dump vcs-info > vcs.json
+// Used indirectly. See build/scripts/vcs_info.py
+// ya-bin dump vcs-info > vcs.json
// python build/scripts/vcs_info.py vcs.json out.c build/scripts/c_templates/svn_interface.c <any_prefix>library/cpp/svnversion<any_suffix>
-
-
-#include "build/scripts/c_templates/svnversion.h"
-
-#define STR1(x) #x
-#define STR2(x) STR1(x)
-
-const char* GetProgramSvnVersion() {
-#if defined(REVISION)
-// for package systems generating from svn export but providing REVISION macro
-#define STRREVISION STR2(REVISION)
-#define REVISIONINFO "r" STRREVISION
-#if defined(PROGRAM_VERSION)
- return PROGRAM_VERSION "\n\n" REVISIONINFO;
-#else
- return REVISIONINFO " "__DATE__
- " "__TIME__;
-#endif
-#elif defined(PROGRAM_VERSION)
- return PROGRAM_VERSION;
-#else
- return "No program version found";
-#endif
-}
-
-const char* GetArcadiaSourcePath() {
-#if defined(ARCADIA_SOURCE_PATH)
- return ARCADIA_SOURCE_PATH;
-#else
- return "";
-#endif
-}
-
-const char* GetArcadiaSourceUrl() {
-#if defined(ARCADIA_SOURCE_URL)
- return ARCADIA_SOURCE_URL;
-#else
- return "";
-#endif
-}
-
-int GetArcadiaLastChangeNum() {
-#if defined(ARCADIA_SOURCE_LAST_CHANGE)
- return ARCADIA_SOURCE_LAST_CHANGE;
-#else
- return 0;
-#endif
-}
-
-const char* GetArcadiaLastChange() {
-#if defined(ARCADIA_SOURCE_LAST_CHANGE)
- return STR2(ARCADIA_SOURCE_LAST_CHANGE);
-#else
- return "";
-#endif
-}
-
-const char* GetArcadiaLastAuthor() {
-#if defined(ARCADIA_SOURCE_LAST_AUTHOR)
- return ARCADIA_SOURCE_LAST_AUTHOR;
-#else
- return "";
-#endif
-}
-
-int GetProgramSvnRevision() {
-#if defined(ARCADIA_SOURCE_REVISION)
- return ARCADIA_SOURCE_REVISION;
-#else
- return 0;
-#endif
-}
-
+
+
+#include "build/scripts/c_templates/svnversion.h"
+
+#define STR1(x) #x
+#define STR2(x) STR1(x)
+
+const char* GetProgramSvnVersion() {
+#if defined(REVISION)
+// for package systems generating from svn export but providing REVISION macro
+#define STRREVISION STR2(REVISION)
+#define REVISIONINFO "r" STRREVISION
+#if defined(PROGRAM_VERSION)
+ return PROGRAM_VERSION "\n\n" REVISIONINFO;
+#else
+ return REVISIONINFO " "__DATE__
+ " "__TIME__;
+#endif
+#elif defined(PROGRAM_VERSION)
+ return PROGRAM_VERSION;
+#else
+ return "No program version found";
+#endif
+}
+
+const char* GetArcadiaSourcePath() {
+#if defined(ARCADIA_SOURCE_PATH)
+ return ARCADIA_SOURCE_PATH;
+#else
+ return "";
+#endif
+}
+
+const char* GetArcadiaSourceUrl() {
+#if defined(ARCADIA_SOURCE_URL)
+ return ARCADIA_SOURCE_URL;
+#else
+ return "";
+#endif
+}
+
+int GetArcadiaLastChangeNum() {
+#if defined(ARCADIA_SOURCE_LAST_CHANGE)
+ return ARCADIA_SOURCE_LAST_CHANGE;
+#else
+ return 0;
+#endif
+}
+
+const char* GetArcadiaLastChange() {
+#if defined(ARCADIA_SOURCE_LAST_CHANGE)
+ return STR2(ARCADIA_SOURCE_LAST_CHANGE);
+#else
+ return "";
+#endif
+}
+
+const char* GetArcadiaLastAuthor() {
+#if defined(ARCADIA_SOURCE_LAST_AUTHOR)
+ return ARCADIA_SOURCE_LAST_AUTHOR;
+#else
+ return "";
+#endif
+}
+
+int GetProgramSvnRevision() {
+#if defined(ARCADIA_SOURCE_REVISION)
+ return ARCADIA_SOURCE_REVISION;
+#else
+ return 0;
+#endif
+}
+
const char* GetVCSDirty()
{
#if defined(DIRTY)
@@ -83,33 +83,33 @@ const char* GetVCSDirty()
#endif
}
-const char* GetProgramHash() {
-#if defined(ARCADIA_SOURCE_HG_HASH)
- return ARCADIA_SOURCE_HG_HASH;
-#else
- return "";
-#endif
-}
-
-const char* GetProgramCommitId() {
-#if defined(ARCADIA_SOURCE_REVISION)
- if (ARCADIA_SOURCE_REVISION <= 0) {
- return GetProgramHash();
- }
- return STR2(ARCADIA_SOURCE_REVISION);
-#else
- return GetProgramHash();
-#endif
-}
-
-const char* GetProgramScmData() {
-#if defined(SCM_DATA)
- return SCM_DATA;
-#else
- return "";
-#endif
-}
-
+const char* GetProgramHash() {
+#if defined(ARCADIA_SOURCE_HG_HASH)
+ return ARCADIA_SOURCE_HG_HASH;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramCommitId() {
+#if defined(ARCADIA_SOURCE_REVISION)
+ if (ARCADIA_SOURCE_REVISION <= 0) {
+ return GetProgramHash();
+ }
+ return STR2(ARCADIA_SOURCE_REVISION);
+#else
+ return GetProgramHash();
+#endif
+}
+
+const char* GetProgramScmData() {
+#if defined(SCM_DATA)
+ return SCM_DATA;
+#else
+ return "";
+#endif
+}
+
const char* GetProgramShortVersionData() {
#if defined(SVN_REVISION) && defined(SVN_TIME)
return STR2(SVN_REVISION) " (" SVN_TIME ")";
@@ -118,30 +118,30 @@ const char* GetProgramShortVersionData() {
#endif
}
-const char* GetProgramBuildUser() {
-#if defined(BUILD_USER)
- return BUILD_USER;
-#else
- return "";
-#endif
-}
-
-const char* GetProgramBuildHost() {
-#if defined(BUILD_HOST)
- return BUILD_HOST;
-#else
- return "";
-#endif
-}
-
-const char* GetProgramBuildDate() {
-#if defined(BUILD_DATE)
- return BUILD_DATE;
-#else
- return "";
-#endif
-}
-
+const char* GetProgramBuildUser() {
+#if defined(BUILD_USER)
+ return BUILD_USER;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramBuildHost() {
+#if defined(BUILD_HOST)
+ return BUILD_HOST;
+#else
+ return "";
+#endif
+}
+
+const char* GetProgramBuildDate() {
+#if defined(BUILD_DATE)
+ return BUILD_DATE;
+#else
+ return "";
+#endif
+}
+
int GetProgramBuildTimestamp() {
#if defined(BUILD_TIMESTAMP)
return BUILD_TIMESTAMP;
@@ -151,34 +151,34 @@ int GetProgramBuildTimestamp() {
}
-const char* GetVCS() {
-#if defined(VCS)
- return VCS;
-#else
- return "";
-#endif
-}
-
-const char* GetBranch() {
-#if defined(BRANCH)
- return BRANCH;
-#else
- return "";
-#endif
-}
-
-int GetArcadiaPatchNumber() {
-#if defined(ARCADIA_PATCH_NUMBER)
- return ARCADIA_PATCH_NUMBER;
-#else
- return 42;
-#endif
-}
-
-const char* GetTag() {
-#if defined(ARCADIA_TAG)
- return ARCADIA_TAG;
-#else
- return "";
-#endif
-}
+const char* GetVCS() {
+#if defined(VCS)
+ return VCS;
+#else
+ return "";
+#endif
+}
+
+const char* GetBranch() {
+#if defined(BRANCH)
+ return BRANCH;
+#else
+ return "";
+#endif
+}
+
+int GetArcadiaPatchNumber() {
+#if defined(ARCADIA_PATCH_NUMBER)
+ return ARCADIA_PATCH_NUMBER;
+#else
+ return 42;
+#endif
+}
+
+const char* GetTag() {
+#if defined(ARCADIA_TAG)
+ return ARCADIA_TAG;
+#else
+ return "";
+#endif
+}
diff --git a/build/scripts/c_templates/svnversion.h b/build/scripts/c_templates/svnversion.h
index 7aece931aa..3cc1adab35 100644
--- a/build/scripts/c_templates/svnversion.h
+++ b/build/scripts/c_templates/svnversion.h
@@ -1,42 +1,42 @@
-#pragma once
-
-// Permit compilation with NO_UTIL():
-// util/system/compiler.h
-#if !defined(Y_HIDDEN)
-#if defined(__GNUC__)
-#define Y_HIDDEN __attribute__((visibility("hidden")))
-#else
-#define Y_HIDDEN
-#endif
-#endif
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
-const char* GetProgramSvnVersion() Y_HIDDEN; // verbose multiline message
-void PrintProgramSvnVersion() Y_HIDDEN;
-const char* GetArcadiaSourcePath() Y_HIDDEN; // "/home/myltsev/arcadia"
-const char* GetArcadiaSourceUrl() Y_HIDDEN; // "svn+ssh://arcadia.yandex.ru/arc/trunk/arcadia"
-const char* GetArcadiaLastChange() Y_HIDDEN; // "2902074"
-int GetArcadiaLastChangeNum() Y_HIDDEN; // 2902074
-const char* GetArcadiaLastAuthor() Y_HIDDEN; // "dieash"
-int GetProgramSvnRevision() Y_HIDDEN; // 2902074
+#pragma once
+
+// Permit compilation with NO_UTIL():
+// util/system/compiler.h
+#if !defined(Y_HIDDEN)
+#if defined(__GNUC__)
+#define Y_HIDDEN __attribute__((visibility("hidden")))
+#else
+#define Y_HIDDEN
+#endif
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+const char* GetProgramSvnVersion() Y_HIDDEN; // verbose multiline message
+void PrintProgramSvnVersion() Y_HIDDEN;
+const char* GetArcadiaSourcePath() Y_HIDDEN; // "/home/myltsev/arcadia"
+const char* GetArcadiaSourceUrl() Y_HIDDEN; // "svn+ssh://arcadia.yandex.ru/arc/trunk/arcadia"
+const char* GetArcadiaLastChange() Y_HIDDEN; // "2902074"
+int GetArcadiaLastChangeNum() Y_HIDDEN; // 2902074
+const char* GetArcadiaLastAuthor() Y_HIDDEN; // "dieash"
+int GetProgramSvnRevision() Y_HIDDEN; // 2902074
const char* GetVCSDirty() Y_HIDDEN;
-const char* GetProgramHash() Y_HIDDEN;
-const char* GetProgramCommitId() Y_HIDDEN;
-void PrintSvnVersionAndExit(int argc, char* argv[]) Y_HIDDEN;
-void PrintSvnVersionAndExitEx(int argc, char* argv[], const char* opts) Y_HIDDEN;
-void PrintSvnVersionAndExit0() Y_HIDDEN;
-const char* GetProgramScmData() Y_HIDDEN; // verbose multiline message
+const char* GetProgramHash() Y_HIDDEN;
+const char* GetProgramCommitId() Y_HIDDEN;
+void PrintSvnVersionAndExit(int argc, char* argv[]) Y_HIDDEN;
+void PrintSvnVersionAndExitEx(int argc, char* argv[], const char* opts) Y_HIDDEN;
+void PrintSvnVersionAndExit0() Y_HIDDEN;
+const char* GetProgramScmData() Y_HIDDEN; // verbose multiline message
const char* GetProgramShortVersionData() Y_HIDDEN;
-const char* GetProgramBuildUser() Y_HIDDEN;
-const char* GetProgramBuildHost() Y_HIDDEN;
-const char* GetProgramBuildDate() Y_HIDDEN;
+const char* GetProgramBuildUser() Y_HIDDEN;
+const char* GetProgramBuildHost() Y_HIDDEN;
+const char* GetProgramBuildDate() Y_HIDDEN;
int GetProgramBuildTimestamp() Y_HIDDEN;
-const char* GetVCS() Y_HIDDEN;
-const char* GetBranch() Y_HIDDEN;
-const char* GetTag() Y_HIDDEN;
-int GetArcadiaPatchNumber() Y_HIDDEN;
-#if defined(__cplusplus)
-}
-#endif
+const char* GetVCS() Y_HIDDEN;
+const char* GetBranch() Y_HIDDEN;
+const char* GetTag() Y_HIDDEN;
+int GetArcadiaPatchNumber() Y_HIDDEN;
+#if defined(__cplusplus)
+}
+#endif
diff --git a/build/scripts/c_templates/ya.make b/build/scripts/c_templates/ya.make
index b395e11021..306077cc96 100644
--- a/build/scripts/c_templates/ya.make
+++ b/build/scripts/c_templates/ya.make
@@ -1,7 +1,7 @@
OWNER(g:ymake)
-LIBRARY(dummy-vcs)
-NO_PLATFORM()
-
-SRCS(svn_interface.c)
-END()
+LIBRARY(dummy-vcs)
+NO_PLATFORM()
+
+SRCS(svn_interface.c)
+END()