diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-11-01 12:33:22 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-11-05 09:22:02 -0500 |
commit | 6e7ff8cba0efaf803e3ef5b5aba4123633fe0658 (patch) | |
tree | 34d13bcfb483674e0ae52bd3fb60f371c20f0155 /src/lib/log | |
parent | 7bb76b24cf755799b7950ef078ac5ccf4d6e3a8a (diff) | |
download | tor-6e7ff8cba0efaf803e3ef5b5aba4123633fe0658.tar.gz tor-6e7ff8cba0efaf803e3ef5b5aba4123633fe0658.zip |
Move the code that knows our tor version into a lowest-level lib
Diffstat (limited to 'src/lib/log')
-rw-r--r-- | src/lib/log/.may_include | 3 | ||||
-rw-r--r-- | src/lib/log/git_revision.c | 24 | ||||
-rw-r--r-- | src/lib/log/git_revision.h | 12 | ||||
-rw-r--r-- | src/lib/log/include.am | 8 | ||||
-rw-r--r-- | src/lib/log/log.c | 2 |
5 files changed, 2 insertions, 47 deletions
diff --git a/src/lib/log/.may_include b/src/lib/log/.may_include index 852173aab3..7ca1863a52 100644 --- a/src/lib/log/.may_include +++ b/src/lib/log/.may_include @@ -10,6 +10,5 @@ lib/log/*.h lib/malloc/*.h lib/string/*.h lib/testsupport/*.h +lib/version/*.h lib/wallclock/*.h - -micro-revision.i
\ No newline at end of file diff --git a/src/lib/log/git_revision.c b/src/lib/log/git_revision.c deleted file mode 100644 index 9d29ecd2a2..0000000000 --- a/src/lib/log/git_revision.c +++ /dev/null @@ -1,24 +0,0 @@ -/* 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/log/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 - ")"; diff --git a/src/lib/log/git_revision.h b/src/lib/log/git_revision.h deleted file mode 100644 index 0ce1190795..0000000000 --- a/src/lib/log/git_revision.h +++ /dev/null @@ -1,12 +0,0 @@ -/* 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 */ - -#ifndef TOR_GIT_REVISION_H -#define TOR_GIT_REVISION_H - -extern const char tor_git_revision[]; -extern const char tor_bug_suffix[]; - -#endif /* !defined(TOR_GIT_REVISION_H) */ diff --git a/src/lib/log/include.am b/src/lib/log/include.am index 4a6c9b3686..c6f404e269 100644 --- a/src/lib/log/include.am +++ b/src/lib/log/include.am @@ -7,7 +7,6 @@ endif src_lib_libtor_log_a_SOURCES = \ src/lib/log/escape.c \ - src/lib/log/git_revision.c \ src/lib/log/ratelim.c \ src/lib/log/log.c \ src/lib/log/util_bug.c @@ -21,15 +20,8 @@ src_lib_libtor_log_testing_a_SOURCES = \ src_lib_libtor_log_testing_a_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_CPPFLAGS) src_lib_libtor_log_testing_a_CFLAGS = $(AM_CFLAGS) $(TEST_CFLAGS) -# Declare that these object files depend on micro-revision.i. Without this -# rule, we could try to build them before micro-revision.i was created. -src/lib/log/git_revision.$(OBJEXT) \ - src/lib/log/src_lib_libtor_log_testing_a-git_revision.$(OBJEXT): \ - micro-revision.i - noinst_HEADERS += \ src/lib/log/escape.h \ - src/lib/log/git_revision.h \ src/lib/log/ratelim.h \ src/lib/log/log.h \ src/lib/log/util_bug.h \ diff --git a/src/lib/log/log.c b/src/lib/log/log.c index d60ce6308a..bc7b36dcb9 100644 --- a/src/lib/log/log.c +++ b/src/lib/log/log.c @@ -32,7 +32,7 @@ #define LOG_PRIVATE #include "lib/log/log.h" -#include "lib/log/git_revision.h" +#include "lib/version/git_revision.h" #include "lib/log/ratelim.h" #include "lib/lock/compat_mutex.h" #include "lib/smartlist_core/smartlist_core.h" |