r10525: change from AC_CHECK_TYPES() to AC_CHECK_TYPE() for intptr_t, so the
authorAndrew Tridgell <tridge@samba.org>
Tue, 27 Sep 2005 03:11:08 +0000 (03:11 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:39:01 +0000 (13:39 -0500)
type is always available, which means we need less #ifdefs
(This used to be commit d4af4b11ae69a63fa3b2048e6d576055d86d2bb4)

source4/build/m4/rewrite.m4
source4/include/includes.h
source4/lib/ldb/include/includes.h
source4/lib/talloc/config.m4

index 846a9e2ceb2c6ececbeb2bb2567d8ec48f4f605e..57ccd9f6ed0936399ef94437e0c92c6f5c4e51da 100644 (file)
@@ -79,7 +79,6 @@ AC_DIRENT_D_OFF
 AC_CHECK_TYPE(ino_t,unsigned)
 AC_CHECK_TYPE(loff_t,off_t)
 AC_CHECK_TYPE(offset_t,loff_t)
-AC_CHECK_TYPES(intptr_t)
 AC_CHECK_TYPES(long long)
 
 
index 41452578ee3e4aa509b3cfacb9b66dc8437d44a3..78481ac6795ae8a3119fc4e69717aabcb1cf3125 100644 (file)
@@ -162,11 +162,7 @@ extern int DEBUGLEVEL;
   Also, please call this via the discard_const_p() macro interface, as that
   makes the return type safe.
 */
-#ifdef HAVE_INTPTR_T
 #define discard_const(ptr) ((void *)((intptr_t)(ptr)))
-#else
-#define discard_const(ptr) ((void *)(ptr))
-#endif
 #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
 
 #ifndef UINT16_MAX
index 8b513e20c74763a5ace8bc6866af01a81aadca64..4372d6b3f95657d0351b47e50d814d4bc6c9bbb1 100644 (file)
@@ -26,9 +26,5 @@
 #include "ldb_private.h"
 #include "talloc.h"
 
-#if defined(__intptr_t_defined) || defined(HAVE_INTPTR_T)
 #define discard_const(ptr) ((void *)((intptr_t)(ptr)))
-#else
-#define discard_const(ptr) ((void *)(ptr))
-#endif
 #define discard_const_p(type, ptr) ((type *)discard_const(ptr))
index 70fedade4ae6b50c0510e8d51dde003eb6347039..824eb6d1ff9fc1182d9bef2ac1ac14555932c733 100644 (file)
@@ -6,5 +6,5 @@ if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
     AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
 fi
 
-AC_CHECK_TYPES(intptr_t)
+AC_CHECK_TYPE(intptr_t, unsigned long long)
 AC_CHECK_HEADERS(stdint.h stdarg.h unistd.h sys/types.h)