diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-07-11 09:52:39 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-07-11 09:52:39 -0400 |
commit | 5aee26ee46d8d38759713d00ce4310a3aef4a559 (patch) | |
tree | b9f2f7218ee3a19dc02fe2f4dff32577a336c1be /src/lib/log/log.c | |
parent | 537092cdbb7f4be0e6d68f4e5d65ca2a403375f9 (diff) | |
download | tor-5aee26ee46d8d38759713d00ce4310a3aef4a559.tar.gz tor-5aee26ee46d8d38759713d00ce4310a3aef4a559.zip |
Move all use cases of micro-revision.i to a single place
That place is git-revision.c; git-revision.c now lives in lib/log.
Also fix the compilation rules so that all object files that need
micro-revision.i depend on it.
Diffstat (limited to 'src/lib/log/log.c')
-rw-r--r-- | src/lib/log/log.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/lib/log/log.c b/src/lib/log/log.c index 8349041ab1..e2514a341b 100644 --- a/src/lib/log/log.c +++ b/src/lib/log/log.c @@ -32,6 +32,7 @@ #define LOG_PRIVATE #include "lib/log/log.h" +#include "lib/log/git_revision.h" #include "lib/log/ratelim.h" #include "lib/lock/compat_mutex.h" #include "lib/smartlist_core/smartlist_core.h" @@ -353,13 +354,6 @@ log_tor_version(logfile_t *lf, int reset) return 0; } -static const char bug_suffix[] = " (on Tor " VERSION -#ifndef _MSC_VER - " " -#include "micro-revision.i" -#endif - ")"; - /** Helper: Format a log message into a fixed-sized buffer. (This is * factored out of <b>logv</b> so that we never format a message more * than once.) Return a pointer to the first character of the message @@ -442,9 +436,9 @@ format_msg(char *buf, size_t buf_len, } if (domain == LD_BUG && - buf_len - n > strlen(bug_suffix)+1) { - memcpy(buf+n, bug_suffix, strlen(bug_suffix)); - n += strlen(bug_suffix); + buf_len - n > strlen(tor_bug_suffix)+1) { + memcpy(buf+n, tor_bug_suffix, strlen(tor_bug_suffix)); + n += strlen(tor_bug_suffix); } buf[n]='\n'; |