aboutsummaryrefslogtreecommitdiff
path: root/src/common/torint.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2012-12-18 13:10:16 -0500
committerNick Mathewson <nickm@torproject.org>2013-01-16 22:29:38 -0500
commit0102aaeb6b513fb40fef51103780fe121e13f549 (patch)
treee2672303bb00df8295264a41879e2be857910247 /src/common/torint.h
parent9b9cc6774fe81e5bf68293308f713d19816ff6da (diff)
downloadtor-0102aaeb6b513fb40fef51103780fe121e13f549.tar
tor-0102aaeb6b513fb40fef51103780fe121e13f549.tar.gz
Define SIZEOF_INTPTR_T when defining replacement intptr_t
Fixes bug 7669
Diffstat (limited to 'src/common/torint.h')
-rw-r--r--src/common/torint.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/torint.h b/src/common/torint.h
index 0db9cc7e2..1d76ee6ac 100644
--- a/src/common/torint.h
+++ b/src/common/torint.h
@@ -214,16 +214,20 @@ typedef int32_t ssize_t;
#if (SIZEOF_VOID_P > 4 && SIZEOF_VOID_P <= 8)
#ifndef HAVE_INTPTR_T
typedef int64_t intptr_t;
+#define SIZEOF_INTPTR_T 8
#endif
#ifndef HAVE_UINTPTR_T
typedef uint64_t uintptr_t;
+#define SIZEOF_UINTPTR_T 8
#endif
#elif (SIZEOF_VOID_P > 2 && SIZEOF_VOID_P <= 4)
#ifndef HAVE_INTPTR_T
typedef int32_t intptr_t;
+#define SIZEOF_INTPTR_T 4
#endif
#ifndef HAVE_UINTPTR_T
typedef uint32_t uintptr_t;
+#define SIZEOF_UINTPTR_T 4
#endif
#else
#error "void * is either >8 bytes or <= 2. In either case, I am confused."