Whamcloud - gitweb
Fix configure.in to use AC_CHECK_TYPES instead of the "broken by design"
authorTheodore Ts'o <tytso@mit.edu>
Sun, 9 Jan 2005 05:57:45 +0000 (00:57 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 9 Jan 2005 05:57:45 +0000 (00:57 -0500)
autoconf 2.13 version of AC_CHECK_TYPE.  Otherwise, on some platforms
intptr_t might get erroneously #define'd to be long.   (Addresses
Debian Bug #289133)

ChangeLog
configure
configure.in
e2fsck/ChangeLog
e2fsck/pass1b.c

index e242021..dd285b9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-01-09  Theodore Ts'o  <tytso@mit.edu>
+
+       * configure.in: Use AC_CHECK_TYPES instead of the autoconf 2.13
+               "broken by design" AC_CHECK_TYPE to look for intptr_t.
+
 2004-12-14  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in: Add install-strip and install-shlibs-strip targets
index 73ae6f7..44e972d 100644 (file)
--- a/configure
+++ b/configure
 echo "$as_me:$LINENO: result: $ac_cv_type_intptr_t" >&5
 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
 if test $ac_cv_type_intptr_t = yes; then
-  :
-else
 
 cat >>confdefs.h <<_ACEOF
-#define intptr_t long
+#define HAVE_INTPTR_T 1
 _ACEOF
 
+
 fi
 
 echo "$as_me:$LINENO: checking whether struct stat has a st_flags field" >&5
index 180b092..6ce5b72 100644 (file)
@@ -631,7 +631,7 @@ dnl
 dnl See if we have inttypes.h and if intptr_t is defined
 dnl
 AC_CHECK_HEADERS([inttypes.h])
-AC_CHECK_TYPE(intptr_t,long)
+AC_CHECK_TYPES(intptr_t)
 dnl
 dnl See if struct stat has a st_flags field, in which case we can get file
 dnl flags somewhat portably.  Also check for the analogous setter, chflags().
index abcaf0a..0fff501 100644 (file)
@@ -1,3 +1,10 @@
+2005-01-09  Theodore Ts'o  <tytso@mit.edu>
+
+       * pass1b.c: As part of converting configure.in from using the
+               "broken by design" 2.13 version of AC_CHECK_TYPE to
+               AC_CHECK_TYPES, if intptr_t isn't defined, manually
+               typedef it to long.  (Addresses Debian Bug #289133)
+
 2005-01-06  Theodore Ts'o  <tytso@mit.edu>
 
        * super.c (check_resize_inode): Use ext2fs_{read,write}_ind_block
index 6df25dc..527ead8 100644 (file)
 #include <inttypes.h>
 #endif
 
+#ifndef HAVE_INTPTR_T
+typedef long intptr_t
+#endif
+
 /* Needed for architectures where sizeof(int) != sizeof(void *) */
 #define INT_TO_VOIDPTR(val)  ((void *)(intptr_t)(val))
 #define VOIDPTR_TO_INT(ptr)  ((int)(intptr_t)(ptr))