aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-08-01 12:36:59 -0400
committerNick Mathewson <nickm@torproject.org>2011-08-01 12:36:59 -0400
commite802199cb3a2ebb4c09eaf4949e279acd3b46fc8 (patch)
treedd7f9967cc185487620e34692611f3d0b7b88a4b /src/or
parent9d77f24cf5032c4a1dbf64ec2e25d7debf3758ed (diff)
downloadtor-e802199cb3a2ebb4c09eaf4949e279acd3b46fc8.tar
tor-e802199cb3a2ebb4c09eaf4949e279acd3b46fc8.tar.gz
Initial patch to build Tor with msvc and nmake
We'll still need to tweak it so that it looks for includes and libraries somewhere more sensible than "where we happened to find them on Erinn's system"; so that tests and tools get built too; so that it's a bit documented; and so that we actually try running the output. Work done with Erinn Clark.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/Makefile.am2
-rw-r--r--src/or/Makefile.nmake28
-rw-r--r--src/or/networkstatus.c7
3 files changed, 29 insertions, 8 deletions
diff --git a/src/or/Makefile.am b/src/or/Makefile.am
index 344e63ff8..e2a1b6d64 100644
--- a/src/or/Makefile.am
+++ b/src/or/Makefile.am
@@ -7,7 +7,7 @@ else
tor_platform_source=
endif
-EXTRA_DIST=ntmain.c or_sha1.i
+EXTRA_DIST=ntmain.c or_sha1.i Makefile.nmake
if USE_EXTERNAL_EVDNS
evdns_source=
diff --git a/src/or/Makefile.nmake b/src/or/Makefile.nmake
new file mode 100644
index 000000000..919edbbf2
--- /dev/null
+++ b/src/or/Makefile.nmake
@@ -0,0 +1,28 @@
+all: tor.exe
+
+CFLAGS = /I ..\win32 /I ..\..\..\build-alpha\include /I ..\common
+
+LIBS = ..\..\..\build-alpha\lib\libevent.a \
+ ..\..\..\build-alpha\lib\libcrypto.a \
+ ..\..\..\build-alpha\lib\libssl.a \
+ ..\..\..\build-alpha\lib\libz.a \
+ ws2_32.lib advapi32.lib shell32.lib
+
+LIBTOR_OBJECTS = buffers.obj circuitbuild.obj circuitlist.obj circuituse.obj \
+ command.obj config.obj connection.obj connection_edge.obj \
+ connection_or.obj control.obj cpuworker.obj directory.obj \
+ dirserv.obj dirvote.obj dns.obj dnsserv.obj geoip.obj \
+ hibernate.obj main.obj microdesc.obj networkstatus.obj \
+ nodelist.obj onion.obj policies.obj reasons.obj relay.obj \
+ rendclient.obj rendcommon.obj rendmid.obj rendservice.obj \
+ rephist.obj router.obj routerlist.obj routerparse.obj status.obj \
+ config_codedigest.obj ntmain.obj
+
+libtor.lib: $(LIBTOR_OBJECTS)
+ lib $(LIBTOR_OBJECTS) /out:libtor.lib
+
+tor.exe: libtor.lib tor_main.obj
+ $(CC) $(CFLAGS) $(LIBS) libtor.lib ..\common\*.lib tor_main.obj
+
+clean:
+ del $(LIBTOR_OBJECTS) *.lib tor.exe
diff --git a/src/or/networkstatus.c b/src/or/networkstatus.c
index 2586ce6eb..868c2a2a7 100644
--- a/src/or/networkstatus.c
+++ b/src/or/networkstatus.c
@@ -2006,13 +2006,6 @@ routers_update_status_from_consensus_networkstatus(smartlist_t *routers,
tor_memcmp(rs->identity_digest,
router->cache_info.identity_digest, DIGEST_LEN),
{
-#if 0
- /* We have no routerstatus for this router. Clear flags and skip it. */
- if (!authdir) {
- if (router->purpose == ROUTER_PURPOSE_GENERAL)
- router_clear_status_flags(router);
- }
-#endif
}) {
/* We have a routerstatus for this router. */
const char *digest = router->cache_info.identity_digest;