6 dnl Find out if VOP_LOCK takes one, two, or three arguments
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>
15 #include <sys/param.h>
16 #include <sys/types.h>
19 #include <sys/vnode.h>
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>
33 #include <sys/param.h>
34 #include <sys/types.h>
37 #include <sys/vnode.h>
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>
51 #include <sys/param.h>
52 #include <sys/types.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])