summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2005-01-09 00:57:45 -0500
committerTheodore Ts'o <tytso@mit.edu>2005-01-09 00:57:45 -0500
commitd2ee56d86eec86acec055f235dab8f1b6569a360 (patch)
tree381efe640cea85c1d2a9bc5c503eeeb70a908c87
parentc840731ea57daa60ea6a59da9610508514326b89 (diff)
downloade2fsprogs-d2ee56d86eec86acec055f235dab8f1b6569a360.tar.gz
Fix configure.in to use AC_CHECK_TYPES instead of the "broken by design"
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)
-rw-r--r--ChangeLog5
-rw-r--r--configure5
-rw-r--r--configure.in2
-rw-r--r--e2fsck/ChangeLog7
-rw-r--r--e2fsck/pass1b.c4
5 files changed, 19 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index e242021a..dd285b95 100644
--- 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
diff --git a/configure b/configure
index 73ae6f7b..44e972d1 100644
--- a/configure
+++ b/configure
@@ -13383,13 +13383,12 @@ fi
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
diff --git a/configure.in b/configure.in
index 180b092c..6ce5b726 100644
--- a/configure.in
+++ b/configure.in
@@ -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().
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index abcaf0a8..0fff501f 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -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
diff --git a/e2fsck/pass1b.c b/e2fsck/pass1b.c
index 6df25dcd..527ead8e 100644
--- a/e2fsck/pass1b.c
+++ b/e2fsck/pass1b.c
@@ -36,6 +36,10 @@
#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))