aboutsummaryrefslogtreecommitdiff
path: root/src/lib/version/git_revision.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-11-01 12:33:22 -0400
committerNick Mathewson <nickm@torproject.org>2018-11-05 09:22:02 -0500
commit6e7ff8cba0efaf803e3ef5b5aba4123633fe0658 (patch)
tree34d13bcfb483674e0ae52bd3fb60f371c20f0155 /src/lib/version/git_revision.c
parent7bb76b24cf755799b7950ef078ac5ccf4d6e3a8a (diff)
downloadtor-6e7ff8cba0efaf803e3ef5b5aba4123633fe0658.tar.gz
tor-6e7ff8cba0efaf803e3ef5b5aba4123633fe0658.zip
Move the code that knows our tor version into a lowest-level lib
Diffstat (limited to 'src/lib/version/git_revision.c')
-rw-r--r--src/lib/version/git_revision.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/version/git_revision.c b/src/lib/version/git_revision.c
new file mode 100644
index 0000000000..e5b2ff534e
--- /dev/null
+++ b/src/lib/version/git_revision.c
@@ -0,0 +1,24 @@
+/* Copyright 2001-2004 Roger Dingledine.
+ * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
+ * Copyright (c) 2007-2018, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+#include "orconfig.h"
+#include "lib/version/git_revision.h"
+
+/** String describing which Tor Git repository version the source was
+ * built from. This string is generated by a bit of shell kludging in
+ * src/core/include.am, and is usually right.
+ */
+const char tor_git_revision[] =
+#ifndef _MSC_VER
+#include "micro-revision.i"
+#endif
+ "";
+
+const char tor_bug_suffix[] = " (on Tor " VERSION
+#ifndef _MSC_VER
+ " "
+#include "micro-revision.i"
+#endif
+ ")";