AC_DEFINE(HAVE_KMEM_CACHE_CREATE_CTOR_TWO_PARAM, 1, [Define if kernel kmem_cache_create constructor has new-style two-parameter form]),
AC_MSG_RESULT(no)
)
CFLAGS=$tmp_cflags
AC_MSG_CHECKING(if kernel address_space struct has a spin_lock field named page_lock)
AC_TRY_COMPILE([
#define __KERNEL__
#include <linux/fs.h>
], [
struct address_space as;
spin_lock(&as.page_lock);
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SPIN_LOCK_PAGE_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock member named page_lock instead of rw_lock]),
AC_MSG_RESULT(no)
)
tmp_cflags=$CFLAGS
CFLAGS="$CFLAGS -Werror"
AC_MSG_CHECKING(if kernel address_space struct has a rwlock_t field named tree_lock)
AC_TRY_COMPILE([
#define __KERNEL__
#include <linux/fs.h>
], [
struct address_space as;
read_lock(&as.tree_lock);
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RW_LOCK_TREE_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a rw_lock_t member named tree_lock]),
AC_MSG_RESULT(no)
)
CFLAGS=$tmp_cflags
tmp_cflags=$CFLAGS
CFLAGS="$CFLAGS -Werror"
AC_MSG_CHECKING(if kernel address_space struct has a spinlock_t field named tree_lock)
AC_TRY_COMPILE([
#define __KERNEL__
#include <linux/fs.h>
], [
struct address_space as;
spin_lock(&as.tree_lock);
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SPIN_LOCK_TREE_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock_t member named tree_lock]),
AC_MSG_RESULT(no)
)
CFLAGS=$tmp_cflags
AC_MSG_CHECKING(if kernel address_space struct has a priv_lock field - from RT linux)
AC_TRY_COMPILE([
#define __KERNEL__
#include <linux/fs.h>
], [
struct address_space as;
spin_lock(&as.priv_lock);
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_RT_PRIV_LOCK_ADDR_SPACE_STRUCT, 1, [Define if kernel address_space struct has a spin_lock for private data instead of rw_lock -- used by RT linux]),
AC_MSG_RESULT(no)
)
AC_MSG_CHECKING(if kernel defines mapping_nrpages macro - from RT linux)
AC_TRY_COMPILE([
#define __KERNEL__
#include <linux/fs.h>
], [
struct address_space idata;
int i = mapping_nrpages(&idata);
],
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MAPPING_NRPAGES_MACRO, 1, [Define if kernel defines mapping_nrpages macro -- defined by RT linux]),
AC_MSG_RESULT(no)
)
dnl Starting with 2.6.25-rc1, .read_inode goes away.