summaryrefslogtreecommitdiff
path: root/include/my_atomic.h
diff options
context:
space:
mode:
authorunknown <serg@janus.mylan>2006-08-01 14:02:19 +0200
committerunknown <serg@janus.mylan>2006-08-01 14:02:19 +0200
commitfe84903b15772782aa3bfbaa5fee60d480eaa4f2 (patch)
treefa9a52e1594e40970c22cd0c3f33519897c39fc0 /include/my_atomic.h
parentb2768ee6810e5bc6e0bf4007859dbe1af3afade5 (diff)
downloadmariadb-git-fe84903b15772782aa3bfbaa5fee60d480eaa4f2.tar.gz
compile-time definition of intptr type
config/ac-macros/misc.m4: remove unnecessary macro configure.in: use AC_CHECK_SIZEOF when appropriate
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