- struct proc_dir_entry pde;
-
- pde.deleted = sizeof(pde);
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_PROCFS_DELETED, 1,
- [kernel has deleted member in procfs entry struct])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.24 has bdi_init()/bdi_destroy() functions.
-AC_DEFUN([LC_EXPORT_BDI_INIT],
-[LB_CHECK_SYMBOL_EXPORT([bdi_init],
-[mm/backing-dev.c],[
- AC_DEFINE(HAVE_BDI_INIT, 1,
- [bdi_init/bdi_destroy functions are present])
-],[
-])
-])
-
-# 2.6.26
-
-# 2.6.26 isn't export set_fs_pwd and change paramter in fs struct
-AC_DEFUN([LC_FS_STRUCT_USE_PATH],
-[AC_MSG_CHECKING([fs_struct use path structure])
-LB_LINUX_TRY_COMPILE([
- #include <asm/atomic.h>
- #include <linux/spinlock.h>
- #include <linux/fs_struct.h>
-],[
- struct fs_struct fs;
-
- fs.pwd = *((struct path *)sizeof(fs));
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_FS_STRUCT_USE_PATH, 1,
- [fs_struct use path structure])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# 2.6.27
-#
-
-# LC_SECURITY_PLUG # for SLES10 SP2 (2.6.27)
-# check security plug in sles10 sp2 kernel
-AC_DEFUN([LC_SECURITY_PLUG],
-[AC_MSG_CHECKING([If kernel has security plug support])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include <linux/stddef.h>
-],[
- notify_change(NULL, NULL, NULL);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_SECURITY_PLUG, 1,
- [SLES10 SP2 use extra parameter in vfs])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-AC_DEFUN([LC_PGMKWRITE_USE_VMFAULT],
-[AC_MSG_CHECKING([kernel .page_mkwrite uses struct vm_fault *])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
- #include <linux/mm.h>
-],[
- ((struct vm_operations_struct *)0)->page_mkwrite((struct vm_area_struct *)0, (struct vm_fault *)0);
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_PGMKWRITE_USE_VMFAULT, 1,
- [kernel vm_operation_struct.page_mkwrite uses struct vm_fault * as second parameter])
-],[
- AC_MSG_RESULT([no])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
-AC_DEFUN([LC_PGMKWRITE_COMPACT],
-[AC_MSG_CHECKING([if kernel .page_mkwrite is located in vm_operation_struct._pmkw])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
- #include <linux/mm.h>
-],[
- struct vm_operations_struct *vm_ops;
-
- vm_ops = NULL;
- vm_ops->_pmkw.page_mkwrite(NULL, NULL);
-], [
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_PGMKWRITE_COMPACT, 1,
- [kernel .page_mkwrite is located in vm_operation_struct._pmkw])
-],[
- AC_MSG_RESULT([no])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
-AC_DEFUN([LC_INODE_PERMISION_2ARGS],
-[AC_MSG_CHECKING([inode_operations->permission has two args])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct inode *inode __attribute__ ((unused));
-
- inode = NULL;
- inode->i_op->permission(NULL, 0);
-],[
- AC_DEFINE(HAVE_INODE_PERMISION_2ARGS, 1,
- [inode_operations->permission has two args])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 have new page locking API
-AC_DEFUN([LC_TRYLOCKPAGE],
-[AC_MSG_CHECKING([kernel uses trylock_page for page lock])
-LB_LINUX_TRY_COMPILE([
- #include <linux/pagemap.h>
-],[
- trylock_page(NULL);
-],[
- AC_DEFINE(HAVE_TRYLOCK_PAGE, 1,
- [kernel uses trylock_page for page lock])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 removed the read_inode from super_operations.
-AC_DEFUN([LC_READ_INODE_IN_SBOPS],
-[AC_MSG_CHECKING([super_operations has a read_inode field])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-],[
- struct super_operations *sop;
- sop->read_inode(NULL);
-],[
- AC_DEFINE(HAVE_READ_INODE_IN_SBOPS, 1,
- [super_operations has a read_inode])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 has inode_permission instead of permisson
-AC_DEFUN([LC_EXPORT_INODE_PERMISSION],
-[LB_CHECK_SYMBOL_EXPORT([inode_permission],
-[fs/namei.c],[
-AC_DEFINE(HAVE_EXPORT_INODE_PERMISSION, 1,
- [inode_permission is exported by the kernel])
-],[
-])
-])
-
-# 2.6.27 use 5th parameter in quota_on for remount.
-AC_DEFUN([LC_QUOTA_ON_5ARGS],
-[AC_MSG_CHECKING([quota_on needs 5 parameters])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include <linux/quota.h>
-],[
- struct quotactl_ops *qop = NULL;
- qop->quota_on(NULL, 0, 0, NULL, 0);
-],[
- AC_DEFINE(HAVE_QUOTA_ON_5ARGS, 1,
- [quota_on needs 5 paramters])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 use 3th parameter in quota_off for remount.
-AC_DEFUN([LC_QUOTA_OFF_3ARGS],
-[AC_MSG_CHECKING([quota_off needs 3 parameters])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include <linux/quota.h>
-],[
- struct quotactl_ops *qop = NULL;
- qop->quota_off(NULL, 0, 0);
-],[
- AC_DEFINE(HAVE_QUOTA_OFF_3ARGS, 1,
- [quota_off needs 3 paramters])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 has vfs_dq_off inline function.
-AC_DEFUN([LC_VFS_DQ_OFF],
-[AC_MSG_CHECKING([vfs_dq_off is defined])
-LB_LINUX_TRY_COMPILE([
- #include <linux/quotaops.h>
-],[
- vfs_dq_off(NULL, 0);
-],[
- AC_DEFINE(HAVE_VFS_DQ_OFF, 1, [vfs_dq_off is defined])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.34 has quotactl_ops->[sg]et_dqblk that take struct fs_disk_quota
-AC_DEFUN([LC_HAVE_DQUOT_FS_DISK_QUOTA],
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-[AC_MSG_CHECKING([if quotactl_ops.set_dqblk takes struct fs_disk_quota])
-LB_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
- #include <linux/quota.h>
-],[
- struct quotactl_ops qops = {};
- struct fs_disk_quota fdq;
- qops.set_dqblk(NULL, 0, 0, &fdq);
-],[
- AC_DEFINE(HAVE_DQUOT_FS_DISK_QUOTA, 1, [quotactl_ops.set_dqblk takes struct fs_disk_quota])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
-# 2.6.34 has renamed dquot options to dquot_*, check for dquot_suspend
-AC_DEFUN([LC_HAVE_DQUOT_SUSPEND],
-[AC_MSG_CHECKING([if dquot_suspend is defined])
-LB_LINUX_TRY_COMPILE([
- #include <linux/quotaops.h>
-],[
- dquot_suspend(NULL, -1);
-],[
- AC_DEFINE(HAVE_DQUOT_SUSPEND, 1, [dquot_suspend is defined])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# LC_LOCK_MAP_ACQUIRE
-# after 2.6.27 lock_map_acquire replaces lock_acquire
-AC_DEFUN([LC_LOCK_MAP_ACQUIRE],
-[AC_MSG_CHECKING([if lock_map_acquire is defined])
-LB_LINUX_TRY_COMPILE([
- #include <linux/lockdep.h>
-],[
- lock_map_acquire(NULL);
-],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_LOCK_MAP_ACQUIRE, 1,
- [lock_map_acquire is defined])
-],[
- AC_MSG_RESULT(no)
-])
-])
-
-# 2.6.27.15-2 sles11
-
-# 2.6.27 sles11 remove the bi_hw_segments
-AC_DEFUN([LC_BI_HW_SEGMENTS],
-[AC_MSG_CHECKING([struct bio has a bi_hw_segments field])
-LB_LINUX_TRY_COMPILE([
- #include <linux/bio.h>
-],[
- struct bio io;
- io.bi_hw_segments = sizeof(io);
-],[
- AC_DEFINE(HAVE_BI_HW_SEGMENTS, 1,
- [struct bio has a bi_hw_segments field])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-#
-# 2.6.27 sles11 move the quotaio_v1{2}.h from include/linux to fs
-# 2.6.32 move the quotaio_v1{2}.h from fs to fs/quota
-AC_DEFUN([LC_HAVE_QUOTAIO_H],
-[LB_CHECK_FILE([$LINUX/include/linux/quotaio_v2.h],[
- AC_DEFINE(HAVE_QUOTAIO_H, 1,
- [kernel has include/linux/quotaio_v2.h])
-],[LB_CHECK_FILE([$LINUX/fs/quotaio_v2.h],[
- AC_DEFINE(HAVE_FS_QUOTAIO_H, 1,
- [kernel has fs/quotaio_v1.h])
-],[LB_CHECK_FILE([$LINUX/fs/quota/quotaio_v2.h],[
- AC_DEFINE(HAVE_FS_QUOTA_QUOTAIO_H, 1,
- [kernel has fs/quota/quotaio_v2.h])
-],[
- AC_MSG_RESULT([no])
-])
-])
-])
-])
-
-# 2.6.27 sles11 has sb_any_quota_active
-AC_DEFUN([LC_SB_ANY_QUOTA_ACTIVE],
-[AC_MSG_CHECKING([Kernel has sb_any_quota_active])
-LB_LINUX_TRY_COMPILE([
- #include <linux/quotaops.h>
-],[
- sb_any_quota_active(NULL);
-],[
- AC_DEFINE(HAVE_SB_ANY_QUOTA_ACTIVE, 1,
- [Kernel has a sb_any_quota_active])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 sles11 has sb_has_quota_active
-AC_DEFUN([LC_SB_HAS_QUOTA_ACTIVE],
-[AC_MSG_CHECKING([Kernel has sb_has_quota_active])
-LB_LINUX_TRY_COMPILE([
- #include <linux/quotaops.h>
-],[
- sb_has_quota_active(NULL, 0);
-],[
- AC_DEFINE(HAVE_SB_HAS_QUOTA_ACTIVE, 1,
- [Kernel has a sb_has_quota_active])
- AC_MSG_RESULT([yes])
-],[
- AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.27 exported add_to_page_cache_lru.
-AC_DEFUN([LC_EXPORT_ADD_TO_PAGE_CACHE_LRU],
-[LB_CHECK_SYMBOL_EXPORT([add_to_page_cache_lru],
-[mm/filemap.c],[
- AC_DEFINE(HAVE_ADD_TO_PAGE_CACHE_LRU, 1,
- [add_to_page_cache_lru functions are present])
-],[
-])
-])
-
-#
-# 2.6.29 introduce sb_any_quota_loaded.
-#
-AC_DEFUN([LC_SB_ANY_QUOTA_LOADED],
-[AC_MSG_CHECKING([Kernel has sb_any_quota_loaded])
-LB_LINUX_TRY_COMPILE([
- #include <linux/quotaops.h>
-],[
- sb_any_quota_loaded(NULL);
-],[
- AC_DEFINE(HAVE_SB_ANY_QUOTA_LOADED, 1,
- [Kernel has a sb_any_quota_loaded])