summaryrefslogtreecommitdiff
path: root/src/or/main.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-09-07 08:46:45 -0400
committerNick Mathewson <nickm@torproject.org>2018-09-07 08:46:45 -0400
commit056003d602a2e6f5c2f417d176b68da50b921c32 (patch)
treec8ae0e394b8a1d51544f840224dac6dc39315fb1 /src/or/main.c
parentdf18cf0e8fa9195df82bef9535f920ad913efab7 (diff)
parent987e12a58f6ce9e0001413e665ac2aa92869af77 (diff)
downloadtor-056003d602a2e6f5c2f417d176b68da50b921c32.tar.gz
tor-056003d602a2e6f5c2f417d176b68da50b921c32.zip
Merge branch 'maint-0.3.2' into maint-0.3.3
Diffstat (limited to 'src/or/main.c')
-rw-r--r--src/or/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/main.c b/src/or/main.c
index 9ecdc95552..3aa730dcec 100644
--- a/src/or/main.c
+++ b/src/or/main.c
@@ -3995,6 +3995,13 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
#endif
/* On heap corruption, just give up; don't try to play along. */
HeapSetInformation(NULL, HeapEnableTerminationOnCorruption, NULL, 0);
+
+ /* SetProcessDEPPolicy is only supported on 32-bit Windows.
+ * (On 64-bit Windows it always fails, and some compilers don't like the
+ * PSETDEP cast.)
+ * 32-bit Windows defines _WIN32.
+ * 64-bit Windows defines _WIN32 and _WIN64. */
+#ifndef _WIN64
/* Call SetProcessDEPPolicy to permanently enable DEP.
The function will not resolve on earlier versions of Windows,
and failure is not dangerous. */
@@ -4008,6 +4015,7 @@ tor_run_main(const tor_main_configuration_t *tor_cfg)
setdeppolicy(3);
}
}
+#endif /* !defined(_WIN64) */
#endif /* defined(_WIN32) */
configure_backtrace_handler(get_version());