summaryrefslogtreecommitdiff
path: root/include/my_atomic.h
diff options
context:
space:
mode:
authorserg@janus.mylan <>2006-08-01 14:02:19 +0200
committerserg@janus.mylan <>2006-08-01 14:02:19 +0200
commit12dc638abd820d813066a137e52ef49cd673e9ac (patch)
treefa9a52e1594e40970c22cd0c3f33519897c39fc0 /include/my_atomic.h
parentfc0c4123d5e9e4d9b8d184f650a96e9c6ad7671b (diff)
downloadmariadb-git-12dc638abd820d813066a137e52ef49cd673e9ac.tar.gz
compile-time definition of intptr type
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