summaryrefslogtreecommitdiff
path: root/include/my_atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_atomic.h')
-rw-r--r--include/my_atomic.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/my_atomic.h b/include/my_atomic.h
index c916026c0e0..9a319f84451 100644
--- a/include/my_atomic.h
+++ b/include/my_atomic.h
@@ -135,7 +135,13 @@ make_atomic_swap(ptr)
#undef _atomic_h_cleanup_
#endif
-typedef int32 intptr; /* TODO configure check */
+#if SIZEOF_CHARP == SIZEOF_INT
+typedef int intptr;
+#elif SIZEOF_CHARP == SIZEOF_LONG
+typedef long intptr;
+#else
+#error
+#endif
#define MY_ATOMIC_OK 0
#define MY_ATOMIC_NOT_1CPU 1