forget about device fd, we don't need it
[arla.git] / cf / bsd-vget.m4
blob44dc899884e654d1649008a4413c41d2aba1e83a
1 dnl
2 dnl $Id$
3 dnl
5 AC_DEFUN([AC_BSD_FUNC_VGET], [
6 AC_CACHE_CHECK(if vget takes one argument, ac_cv_func_vget_one_args,
7 AC_TRY_COMPILE_KERNEL([
8 #ifdef HAVE_SYS_CDEFS_H
9 #include <sys/cdefs.h>
10 #endif
11 #if defined(__osf__) && defined(__GNUC__)
12 #define asm __foo_asm
13 #endif
14 #include <sys/types.h>
15 #include <sys/param.h>
16 #include <sys/time.h>
17 #include <sys/uio.h>
18 #include <sys/vnode.h>
19 ],[vget(0)],
20 ac_cv_func_vget_one_args=yes,
21 ac_cv_func_vget_one_args=no))
22 if test "$ac_cv_func_vget_one_args" = yes; then
23         AC_DEFINE_UNQUOTED(HAVE_ONE_ARGUMENT_VGET, 1,
24         [define if vget takes one argument])
27 AC_CACHE_CHECK(if vget takes two arguments, ac_cv_func_vget_two_args,
28 AC_TRY_COMPILE_KERNEL([
29 #ifdef HAVE_SYS_CDEFS_H
30 #include <sys/cdefs.h>
31 #endif
32 #include <sys/types.h>
33 #include <sys/param.h>
34 #include <sys/time.h>
35 #include <sys/uio.h>
36 #include <sys/vnode.h>
37 ],[vget(0, 0)],
38 ac_cv_func_vget_two_args=yes,
39 ac_cv_func_vget_two_args=no))
40 if test "$ac_cv_func_vget_two_args" = yes; then
41         AC_DEFINE_UNQUOTED(HAVE_TWO_ARGUMENT_VGET, 1,
42         [define if vget takes two arguments])
45 AC_CACHE_CHECK(if vget takes three arguments, ac_cv_func_vget_three_args,
46 AC_TRY_COMPILE_KERNEL([
47 #ifdef HAVE_SYS_CDEFS_H
48 #include <sys/cdefs.h>
49 #endif
50 #include <sys/types.h>
51 #include <sys/param.h>
52 #include <sys/time.h>
53 #include <sys/uio.h>
54 #include <sys/vnode.h>
55 ],[vget(0, 0, 0)],
56 ac_cv_func_vget_three_args=yes,
57 ac_cv_func_vget_three_args=no))
58 if test "$ac_cv_func_vget_three_args" = yes; then
59         AC_DEFINE(HAVE_THREE_ARGUMENT_VGET, 1,
60         [define if vget takes three arguments])
63 AC_CACHE_CHECK(if vget takes four arguments, ac_cv_func_vget_four_args,
64 AC_TRY_COMPILE_KERNEL([
65 #ifdef HAVE_SYS_CDEFS_H
66 #include <sys/cdefs.h>
67 #endif
68 #include <sys/types.h>
69 #include <sys/param.h>
70 #include <sys/time.h>
71 #include <sys/uio.h>
72 #include <sys/vnode.h>
73 ],[vget(0, 0, 0, 0)],
74 ac_cv_func_vget_four_args=yes,
75 ac_cv_func_vget_four_args=no))
76 if test "$ac_cv_func_vget_four_args" = yes; then
77         AC_DEFINE(HAVE_FOUR_ARGUMENT_VGET, 1,
78         [define if vget takes four arguments])
81 if test "$ac_cv_func_vget_one_args" = "no" -a "$ac_cv_func_vget_two_args" = "no" -a "$ac_cv_func_vget_three_args" = "no" -a "$ac_cv_func_vget_four_args" = "no"; then
82   AC_MSG_ERROR([test for number of arguments of vget failed])