* 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.
This commit is contained in:
Pavel Roskin 2003-11-28 06:18:32 +00:00
parent 72a4d97988
commit d6d5688bed
2 changed files with 17 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2003-11-28 Pavel Roskin <proski@gnu.org>
* 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 <proski@gnu.org> 2003-11-27 Pavel Roskin <proski@gnu.org>
* src/TODO: Move ... * src/TODO: Move ...

View File

@ -7,12 +7,17 @@ dnl Will set EXT2FS_UNDEL_LIBS to required libraries.
AC_DEFUN([MC_UNDELFS_CHECKS], [ AC_DEFUN([MC_UNDELFS_CHECKS], [
ext2fs_undel=no ext2fs_undel=no
EXT2FS_UNDEL_LIBS= EXT2FS_UNDEL_LIBS=
AC_CHECK_HEADERS([linux/ext2_fs.h], [linux_ext2_fs_h=yes]) AC_CHECK_HEADERS([ext2fs/ext2_fs.h linux/ext2_fs.h], [ext2_fs_h=yes; break])
if test x$linux_ext2_fs_h = xyes; then if test x$ext2_fs_h = xyes; then
AC_CHECK_HEADERS([ext2fs/ext2fs.h], [ext2fs_ext2fs_h=yes], , AC_CHECK_HEADERS([ext2fs/ext2fs.h], [ext2fs_ext2fs_h=yes], ,
[ [
#include <stdio.h> #include <stdio.h>
#ifdef HAVE_EXT2FS_EXT2_FS_H
#include <ext2fs/ext2_fs.h>
#else
#undef umode_t
#include <linux/ext2_fs.h> #include <linux/ext2_fs.h>
#endif
]) ])
if test x$ext2fs_ext2fs_h = xyes; then if test x$ext2fs_ext2fs_h = xyes; then
AC_DEFINE(USE_EXT2FSLIB, 1, AC_DEFINE(USE_EXT2FSLIB, 1,
@ -27,9 +32,12 @@ AC_DEFUN([MC_UNDELFS_CHECKS], [
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
#include <stdlib.h> #include <stdlib.h>
/* asm/types.h defines its own umode_t :-( */ #ifdef HAVE_EXT2FS_EXT2_FS_H
#include <ext2fs/ext2_fs.h>
#else
#undef umode_t #undef umode_t
#include <linux/ext2_fs.h> #include <linux/ext2_fs.h>
#endif
#include <ext2fs/ext2fs.h> #include <ext2fs/ext2fs.h>
]) ])
fi fi