aboutsummaryrefslogtreecommitdiff
path: root/src/win32
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-01-29 17:38:15 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-29 17:38:15 -0500
commit73d605b0f759a2ff9f859f78f76098dcdb290d37 (patch)
tree6293cd558c73359e726a40c8d6157af08be7cd35 /src/win32
parenta0351311aeea715cea24e156e065b65cc29a804c (diff)
downloadtor-73d605b0f759a2ff9f859f78f76098dcdb290d37.tar
tor-73d605b0f759a2ff9f859f78f76098dcdb290d37.tar.gz
Detect platforms where memset(0) doesn't set doubles to 0.0.
This is allowed by the C statndard, which permits you to represent doubles any way you like, but in practice we have some code that assumes that memset() clears doubles in structs. Noticed as part of 7802 review; see 8081 for more info.
Diffstat (limited to 'src/win32')
-rw-r--r--src/win32/orconfig.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/win32/orconfig.h b/src/win32/orconfig.h
index 6e45a2928..ef08fdb2b 100644
--- a/src/win32/orconfig.h
+++ b/src/win32/orconfig.h
@@ -151,6 +151,9 @@
/* Define to 1 iff NULL is represented by a 0 in memory. */
#define NULL_REP_IS_ZERO_BYTES 1
+/* Define to 1 iff memset(0) sets doubles to 0.0 */
+#define DOUBLE_0_REP_IS_ZERO_BYTES 1
+
/* Name of package */
#define PACKAGE "tor"