Avoid using deprecated form of AC_CHECK_TYPE.
authorBrad Hards <bradh@frogmouth.net>
Wed, 22 Apr 2009 08:32:53 +0000 (10:32 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Wed, 22 Apr 2009 08:36:47 +0000 (10:36 +0200)
libreplace makes use of an older form of AC_CHECK_TYPE which basically
provides a fallback definition for the type if it isn't available.
http://www.gnu.org/software/hello/manual/autoconf/Obsolete-Macros.html#Obsolete-Macros
shows why this isn't a good idea (its not so important, except for pointer types).
This patch partly addresses the issue.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
lib/replace/libreplace_cc.m4
lib/replace/replace.h

index 30c63f2f058afe334036559f95b845f4d1003ddb..a26dee498e93f03f0cada2715839ab0200b16f1d 100644 (file)
@@ -141,9 +141,7 @@ AC_CHECK_SIZEOF(off_t)
 AC_CHECK_SIZEOF(size_t)
 AC_CHECK_SIZEOF(ssize_t)
 
-AC_CHECK_TYPE(intptr_t, long long)
-AC_CHECK_TYPE(uintptr_t, unsigned long long)
-AC_CHECK_TYPE(ptrdiff_t, unsigned long long)
+AC_CHECK_TYPES([intptr_t, uintptr_t, ptrdiff_t])
 
 if test x"$ac_cv_type_long_long" != x"yes";then
        AC_MSG_ERROR([LIBREPLACE needs type 'long long'])
index c5b8676acfa6e8baadc9ca9e87547cfba7577e6c..fe1f732acb275434ffdbab15ae48d768ecda15f5 100644 (file)
@@ -535,6 +535,18 @@ typedef int bool;
 #endif
 #endif
 
+#if !defined(HAVE_INTPTR_T)
+typedef long long intptr_t ;
+#endif
+
+#if !defined(HAVE_UINTPTR_T)
+typedef unsigned long long uintptr_t ;
+#endif
+
+#if !defined(HAVE_PTRDIFF_T)
+typedef unsigned long long ptrdiff_t ;
+#endif
+
 /*
  * to prevent <rpcsvc/yp_prot.h> from doing a redefine of 'bool'
  *