aboutsummaryrefslogtreecommitdiff
path: root/src/common/compat.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-09-09 12:08:03 -0400
committerNick Mathewson <nickm@torproject.org>2014-09-09 12:08:03 -0400
commit1eea7a68ed1534493ba2def4e2086fe8d9046e74 (patch)
tree78ba32b339f277905414f1618e492745a27568ef /src/common/compat.c
parent409a56281eda6e0f39ecb1a2737eb4ab39b0229b (diff)
downloadtor-1eea7a68ed1534493ba2def4e2086fe8d9046e74.tar.gz
tor-1eea7a68ed1534493ba2def4e2086fe8d9046e74.zip
Use S?SIZE_MAX, not S?SIZE_T_MAX
This fixes bug 13102 (not on any released Tor) where using the standard SSIZE_MAX name broke mingw64, and we didn't realize. I did this with perl -i -pe 's/SIZE_T_MAX/SIZE_MAX/' src/*/*.[ch] src/*/*/*.[ch]
Diffstat (limited to 'src/common/compat.c')
-rw-r--r--src/common/compat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index ad627f13f3..4dd04455a2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -3566,12 +3566,12 @@ get_total_system_memory(size_t *mem_out)
return 0;
}
-#if SIZE_T_MAX != UINT64_MAX
- if (m > SIZE_T_MAX) {
+#if SIZE_MAX != UINT64_MAX
+ if (m > SIZE_MAX) {
/* I think this could happen if we're a 32-bit Tor running on a 64-bit
* system: we could have more system memory than would fit in a
* size_t. */
- m = SIZE_T_MAX;
+ m = SIZE_MAX;
}
#endif