LINUX: Detect non-vectorized aio functions
[openafs.git] / src / cf / linux-test4.m4
index 75561bf..63aab1d 100644 (file)
@@ -1,3 +1,17 @@
+
+AC_DEFUN([LINUX_AIO_NONVECTOR],
+ [AC_CHECK_LINUX_BUILD([for non-vectorized aio kernel functions],
+                       [ac_cv_linux_aio_nonvector],
+                       [#include <linux/fs.h>],
+                       [extern ssize_t
+                        generic_file_aio_read(struct kiocb *, char __user *,
+                                              size_t, loff_t);],
+                       [LINUX_HAS_NONVECTOR_AIO],
+                       [define if kernel functions like generic_file_aio_read use
+                        non-vectorized i/o],
+                       [])
+ ])
+
 AC_DEFUN([LINUX_EXPORTS_TASKLIST_LOCK], [
   AC_CHECK_LINUX_BUILD([for exported tasklist_lock],
                       [ac_cv_linux_exports_tasklist_lock],
@@ -702,3 +716,46 @@ AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [
                        [define if dentry->d_alias is an hlist],
                        [])
 ])
+
+
+AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [
+  AC_CHECK_LINUX_BUILD([whether inode_operations.create takes a bool],
+                       [ac_cv_linux_func_i_create_takes_bool],
+                       [#include <linux/fs.h>
+                       #include <linux/namei.h>],
+                       [struct inode _inode = {};
+                       struct dentry _dentry;
+                       bool b = true;
+                       (void)_inode.i_op->create(&_inode, &_dentry, 0, b);],
+                      [IOP_CREATE_TAKES_BOOL],
+                      [define if your iops.create takes a bool argument],
+                      [-Werror])
+])
+
+
+AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED], [
+  AC_CHECK_LINUX_BUILD([whether dentry_operations.d_revalidate takes an unsigned int],
+                       [ac_cv_linux_func_d_revalidate_takes_unsigned],
+                       [#include <linux/fs.h>
+                       #include <linux/namei.h>],
+                       [struct dentry_operations dops;
+                       int reval(struct dentry *d, unsigned int i) { return 0; };
+                       dops.d_revalidate = reval;],
+                      [DOP_REVALIDATE_TAKES_UNSIGNED],
+                      [define if your dops.d_revalidate takes an unsigned int argument],
+                      [-Werror])
+])
+
+
+AC_DEFUN([LINUX_IOP_LOOKUP_TAKES_UNSIGNED], [
+  AC_CHECK_LINUX_BUILD([whether inode operation lookup takes an unsigned int],
+                       [ac_cv_linux_func_lookup_takes_unsigned],
+                       [#include <linux/fs.h>
+                       #include <linux/namei.h>],
+                       [struct inode_operations iops;
+                       struct dentry *look(struct inode *i, struct dentry *d, unsigned int j) { return NULL; };
+                       iops.lookup = look;],
+                      [IOP_LOOKUP_TAKES_UNSIGNED],
+                      [define if your iops.lookup takes an unsigned int argument],
+                      [-Werror])
+])