forget about device fd, we don't need it
[arla.git] / cf / bsd-vop-lock.m4
blob405bf90d9ed73b6baf4819511a18ae44fb570983
1 dnl
2 dnl $Id$
3 dnl
5 dnl
6 dnl Find out if VOP_LOCK takes one, two, or three arguments
7 dnl
9 AC_DEFUN([AC_BSD_FUNC_VOP_LOCK], [
10 AC_CACHE_CHECK(if VOP_LOCK takes one argument, ac_cv_func_vop_lock_one_arg,
11 AC_TRY_COMPILE_KERNEL([
12 #ifdef HAVE_SYS_CDEFS_H
13 #include <sys/cdefs.h>
14 #endif
15 #include <sys/param.h>
16 #include <sys/types.h>
17 #include <sys/time.h>
18 #include <sys/uio.h>
19 #include <sys/vnode.h>
20 ],[VOP_LOCK(0)],
21 ac_cv_func_vop_lock_one_arg=yes,
22 ac_cv_func_vop_lock_one_arg=no))
23 if test "$ac_cv_func_vop_lock_one_arg" = yes; then
24         AC_DEFINE_UNQUOTED(HAVE_ONE_ARGUMENT_VOP_LOCK, 1,
25         [define if VOP_LOCK takes one argument])
28 AC_CACHE_CHECK(if VOP_LOCK takes two arguments, ac_cv_func_vop_lock_two_args,
29 AC_TRY_COMPILE_KERNEL([
30 #ifdef HAVE_SYS_CDEFS_H
31 #include <sys/cdefs.h>
32 #endif
33 #include <sys/param.h>
34 #include <sys/types.h>
35 #include <sys/time.h>
36 #include <sys/uio.h>
37 #include <sys/vnode.h>
38 ],[VOP_LOCK(0, 0)],
39 ac_cv_func_vop_lock_two_args=yes,
40 ac_cv_func_vop_lock_two_args=no))
41 if test "$ac_cv_func_vop_lock_two_args" = yes; then
42         AC_DEFINE(HAVE_TWO_ARGUMENT_VOP_LOCK, 1,
43         [define if VOP_LOCK takes two arguments])
46 AC_CACHE_CHECK(if VOP_LOCK takes three arguments, ac_cv_func_vop_lock_three_args,
47 AC_TRY_COMPILE_KERNEL([
48 #ifdef HAVE_SYS_CDEFS_H
49 #include <sys/cdefs.h>
50 #endif
51 #include <sys/param.h>
52 #include <sys/types.h>
53 #include <sys/time.h>
54 #include <sys/uio.h>
55 #include <sys/vnode.h>
56 ],[VOP_LOCK(0, 0, 0)],
57 ac_cv_func_vop_lock_three_args=yes,
58 ac_cv_func_vop_lock_three_args=no))
59 if test "$ac_cv_func_vop_lock_three_args" = yes; then
60         AC_DEFINE(HAVE_THREE_ARGUMENT_VOP_LOCK, 1,
61         [define if VOP_LOCK takes three arguments])