diff options
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/Makefile.am | 6 | ||||
-rw-r--r-- | src/or/config.c | 4 | ||||
-rw-r--r-- | src/or/config_codedigest.c | 10 | ||||
-rw-r--r-- | src/or/or.h | 2 |
4 files changed, 16 insertions, 6 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am index 03e7900944..11923fbd35 100644 --- a/src/or/Makefile.am +++ b/src/or/Makefile.am @@ -20,7 +20,7 @@ tor_SOURCES = buffers.c circuitbuild.c circuitlist.c \ networkstatus.c onion.c policies.c \ reasons.c relay.c rendcommon.c rendclient.c rendmid.c \ rendservice.c rephist.c router.c routerlist.c routerparse.c \ - eventdns.c \ + eventdns.c config_codedigest.c \ tor_main.c AM_CPPFLAGS = -DSHARE_DATADIR="\"$(datadir)\"" \ @@ -42,7 +42,7 @@ test_SOURCES = buffers.c circuitbuild.c circuitlist.c \ networkstatus.c onion.c policies.c \ reasons.c relay.c rendcommon.c rendclient.c rendmid.c \ rendservice.c rephist.c router.c routerlist.c routerparse.c \ - eventdns.c \ + eventdns.c config_codedigest.c \ test_data.c test.c test_LDFLAGS = @TOR_LDFLAGS_zlib@ @TOR_LDFLAGS_openssl@ \ @@ -52,7 +52,7 @@ test_LDADD = ../common/libor.a ../common/libor-crypto.a \ noinst_HEADERS = or.h eventdns.h eventdns_tor.h micro-revision.i -config.o: or_sha1.i +config_codedigest.o: or_sha1.i tor_main.o: micro-revision.i diff --git a/src/or/config.c b/src/or/config.c index 76de52748c..93177a166c 100644 --- a/src/or/config.c +++ b/src/or/config.c @@ -3930,9 +3930,7 @@ options_init_from_torrc(int argc, char **argv) if (argc > 1 && (!strcmp(argv[1],"--digests"))) { printf("Tor version %s.\n",get_version()); printf("%s", libor_get_digests()); - printf("%s", "" -#include "or_sha1.i" - ); + printf("%s", tor_get_digests()); exit(0); } diff --git a/src/or/config_codedigest.c b/src/or/config_codedigest.c new file mode 100644 index 0000000000..67fd9847c2 --- /dev/null +++ b/src/or/config_codedigest.c @@ -0,0 +1,10 @@ + +const char *tor_get_digests(void); + +const char * +tor_get_digests(void) +{ + return "" +#include "or_sha1.i" + ; +} diff --git a/src/or/or.h b/src/or/or.h index 854b541d3d..fd75229649 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2911,6 +2911,8 @@ int options_need_geoip_info(or_options_t *options, const char **reason_out); int getinfo_helper_config(control_connection_t *conn, const char *question, char **answer); +const char *tor_get_digests(void); + #ifdef CONFIG_PRIVATE /* Used only by config.c and test.c */ or_options_t *options_new(void); |