diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-10-18 13:49:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-10-18 13:49:35 -0400 |
commit | 72b5e4a2db4282002fe50e11c2b8a79e108d30f8 (patch) | |
tree | fe3b853d65170b1d3c30df4a6d9553ae51c3fc64 /src/or/git_revision.h | |
parent | b9b5f9a1a5a683611789ffe4c49e41325102cabc (diff) | |
download | tor-72b5e4a2db4282002fe50e11c2b8a79e108d30f8.tar.gz tor-72b5e4a2db4282002fe50e11c2b8a79e108d30f8.zip |
Move tor_git_revision into a new module.
At first, we put the tor_git_revision constant in tor_main.c, so
that we wouldn't have to recompile config.o every time the git
revision changed. But putting it there had unintended side effect
of forcing every program that wanted to link libor.a (including
test, test-slow, the fuzzers, the benchmarks, etc) to declare their
own tor_git_revision instance.
That's not very nice, especially since we want to start supporting
others who want to link against Tor (see 23846).
So, create a new git_revision.c file that only contains this
constant, and remove the duplicated boilerplate from everywhere
else.
Part of implementing ticket 23845.
Diffstat (limited to 'src/or/git_revision.h')
-rw-r--r-- | src/or/git_revision.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/or/git_revision.h b/src/or/git_revision.h new file mode 100644 index 0000000000..1ceaeedf16 --- /dev/null +++ b/src/or/git_revision.h @@ -0,0 +1,12 @@ +/* Copyright 2001-2004 Roger Dingledine. + * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson. + * Copyright (c) 2007-2017, 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[]; + +#endif + |