CI: Move perl script to dist_noinst_DATA
[zfs.git] / config / kernel-vfs-getattr.m4
blobeb07853cc4b9decb0811df713c358dec889dcefc
1 dnl #
2 dnl # 4.11 API, a528d35e@torvalds/linux
3 dnl # vfs_getattr(const struct path *p, struct kstat *s, u32 m, unsigned int f)
4 dnl #
5 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GETATTR_4ARGS], [
6         ZFS_LINUX_TEST_SRC([vfs_getattr_4args], [
7                 #include <linux/fs.h>
8         ],[
9                 vfs_getattr((const struct path *)NULL,
10                         (struct kstat *)NULL,
11                         (u32)0,
12                         (unsigned int)0);
13         ])
16 AC_DEFUN([ZFS_AC_KERNEL_VFS_GETATTR_4ARGS], [
17         AC_MSG_CHECKING([whether vfs_getattr() wants 4 args])
18         ZFS_LINUX_TEST_RESULT([vfs_getattr_4args], [
19                 AC_MSG_RESULT(yes)
20                 AC_DEFINE(HAVE_4ARGS_VFS_GETATTR, 1,
21                     [vfs_getattr wants 4 args])
22         ],[
23                 AC_MSG_RESULT(no)
24         ])
27 dnl #
28 dnl # 3.9 API
29 dnl # vfs_getattr(struct path *p, struct kstat *s)
30 dnl #
31 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GETATTR_2ARGS], [
32         ZFS_LINUX_TEST_SRC([vfs_getattr_2args], [
33                 #include <linux/fs.h>
34         ],[
35                 vfs_getattr((struct path *) NULL,
36                         (struct kstat *)NULL);
37         ])
40 AC_DEFUN([ZFS_AC_KERNEL_VFS_GETATTR_2ARGS], [
41         AC_MSG_CHECKING([whether vfs_getattr() wants 2 args])
42         ZFS_LINUX_TEST_RESULT([vfs_getattr_2args], [
43                 AC_MSG_RESULT(yes)
44                 AC_DEFINE(HAVE_2ARGS_VFS_GETATTR, 1,
45                     [vfs_getattr wants 2 args])
46         ],[
47                 AC_MSG_RESULT(no)
48         ])
51 dnl #
52 dnl # <3.9 API
53 dnl # vfs_getattr(struct vfsmount *v, struct dentry *d, struct kstat *k)
54 dnl #
55 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GETATTR_3ARGS], [
56         ZFS_LINUX_TEST_SRC([vfs_getattr_3args], [
57                 #include <linux/fs.h>
58         ],[
59                 vfs_getattr((struct vfsmount *)NULL,
60                         (struct dentry *)NULL,
61                         (struct kstat *)NULL);
62         ])
65 AC_DEFUN([ZFS_AC_KERNEL_VFS_GETATTR_3ARGS], [
66         AC_MSG_CHECKING([whether vfs_getattr() wants 3 args])
67         ZFS_LINUX_TEST_RESULT([vfs_getattr_3args], [
68                 AC_MSG_RESULT(yes)
69                 AC_DEFINE(HAVE_3ARGS_VFS_GETATTR, 1,
70                     [vfs_getattr wants 3 args])
71         ],[
72                 AC_MSG_RESULT(no)
73         ])
76 AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_GETATTR], [
77         ZFS_AC_KERNEL_SRC_VFS_GETATTR_4ARGS
78         ZFS_AC_KERNEL_SRC_VFS_GETATTR_2ARGS
79         ZFS_AC_KERNEL_SRC_VFS_GETATTR_3ARGS
82 AC_DEFUN([ZFS_AC_KERNEL_VFS_GETATTR], [
83         ZFS_AC_KERNEL_VFS_GETATTR_4ARGS
84         ZFS_AC_KERNEL_VFS_GETATTR_2ARGS
85         ZFS_AC_KERNEL_VFS_GETATTR_3ARGS