From d6d5688bed400c182390c955bd1f259c21b04bbd Mon Sep 17 00:00:00 2001 From: Pavel Roskin Date: Fri, 28 Nov 2003 06:18:32 +0000 Subject: [PATCH] * acinclude.m4 (MC_UNDELFS_CHECKS): Try ext2fs/ext2_fs.h before linux/ext2_fs.h. Use ext2fs/ext2_fs.h when possible - it's safer to avoid kernel headers. --- ChangeLog | 6 ++++++ acinclude.m4 | 14 +++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6dcd4d124..d85c4ce90 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-11-28 Pavel Roskin + + * acinclude.m4 (MC_UNDELFS_CHECKS): Try ext2fs/ext2_fs.h before + linux/ext2_fs.h. Use ext2fs/ext2_fs.h when possible - it's + safer to avoid kernel headers. + 2003-11-27 Pavel Roskin * src/TODO: Move ... diff --git a/acinclude.m4 b/acinclude.m4 index 16a02f111..e39d500fa 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -7,12 +7,17 @@ dnl Will set EXT2FS_UNDEL_LIBS to required libraries. AC_DEFUN([MC_UNDELFS_CHECKS], [ ext2fs_undel=no EXT2FS_UNDEL_LIBS= - AC_CHECK_HEADERS([linux/ext2_fs.h], [linux_ext2_fs_h=yes]) - if test x$linux_ext2_fs_h = xyes; then + AC_CHECK_HEADERS([ext2fs/ext2_fs.h linux/ext2_fs.h], [ext2_fs_h=yes; break]) + if test x$ext2_fs_h = xyes; then AC_CHECK_HEADERS([ext2fs/ext2fs.h], [ext2fs_ext2fs_h=yes], , [ #include +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else +#undef umode_t #include +#endif ]) if test x$ext2fs_ext2fs_h = xyes; then AC_DEFINE(USE_EXT2FSLIB, 1, @@ -27,9 +32,12 @@ AC_DEFUN([MC_UNDELFS_CHECKS], [ #include #include #include -/* asm/types.h defines its own umode_t :-( */ +#ifdef HAVE_EXT2FS_EXT2_FS_H +#include +#else #undef umode_t #include +#endif #include ]) fi