1 AC_DEFUN([LINUX_EXPORTS_TASKLIST_LOCK], [
2 AC_MSG_CHECKING([for exported tasklist_lock])
3 AC_CACHE_VAL([ac_cv_linux_exports_tasklist_lock], [
6 #include <linux/sched.h>],
8 extern rwlock_t tasklist_lock __attribute__((weak));
9 read_lock(&tasklist_lock);
11 ac_cv_linux_exports_tasklist_lock=yes,
12 ac_cv_linux_exports_tasklist_lock=no)])
13 AC_MSG_RESULT($ac_cv_linux_exports_tasklist_lock)])
16 AC_DEFUN([LINUX_CONFIG_H_EXISTS], [
17 AC_MSG_CHECKING([for linux/config.h existance])
18 AC_CACHE_VAL([ac_cv_linux_config_h_exists], [
20 [#include <linux/config.h>],
22 ac_cv_linux_config_h_exists=yes,
23 ac_cv_linux_config_h_exists=no)])
24 AC_MSG_RESULT($ac_cv_linux_config_h_exists)
25 if test "x$ac_cv_linux_config_h_exists" = "xyes"; then
26 AC_DEFINE([CONFIG_H_EXISTS], 1, [define if linux/config.h exists])
30 AC_DEFUN([LINUX_COMPLETION_H_EXISTS], [
31 AC_MSG_CHECKING([for linux/completion.h existance])
32 AC_CACHE_VAL([ac_cv_linux_completion_h_exists], [
34 [#include <linux/version.h>
35 #include <linux/completion.h>],
36 [struct completion _c;
37 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,8)
40 ac_cv_linux_completion_h_exists=yes,
41 ac_cv_linux_completion_h_exists=no)])
42 AC_MSG_RESULT($ac_cv_linux_completion_h_exists)])
44 AC_DEFUN([LINUX_EXPORTFS_H_EXISTS], [
45 AC_MSG_CHECKING([for linux/exportfs.h existence])
46 AC_CACHE_VAL([ac_cv_linux_exportfs_h_exists], [
48 [#include <linux/exportfs.h>],
50 ac_cv_linux_exportfs_h_exists=yes,
51 ac_cv_linux_exportfs_h_exists=no)])
52 AC_MSG_RESULT($ac_cv_linux_exportfs_h_exists)])
54 AC_DEFUN([LINUX_DEFINES_FOR_EACH_PROCESS], [
55 AC_MSG_CHECKING([for defined for_each_process])
56 AC_CACHE_VAL([ac_cv_linux_defines_for_each_process], [
58 [#include <linux/sched.h>],
59 [#ifndef for_each_process
60 #error for_each_process not defined
62 ac_cv_linux_defines_for_each_process=yes,
63 ac_cv_linux_defines_for_each_process=no)])
64 AC_MSG_RESULT($ac_cv_linux_defines_for_each_process)])
67 AC_DEFUN([LINUX_DEFINES_PREV_TASK], [
68 AC_MSG_CHECKING([for defined prev_task])
69 AC_CACHE_VAL([ac_cv_linux_defines_prev_task], [
71 [#include <linux/sched.h>],
73 #error prev_task not defined
75 ac_cv_linux_defines_prev_task=yes,
76 ac_cv_linux_defines_prev_task=no)])
77 AC_MSG_RESULT($ac_cv_linux_defines_prev_task)])
80 AC_DEFUN([LINUX_EXPORTS_INIT_MM], [
81 AC_MSG_CHECKING([for exported init_mm])
82 AC_CACHE_VAL([ac_cv_linux_exports_init_mm], [
84 [extern struct mm_struct init_mm;],
85 [void *address = &init_mm;
86 printk("%p\n", address);],
87 ac_cv_linux_exports_init_mm=yes,
88 ac_cv_linux_exports_init_mm=no)])
89 AC_MSG_RESULT($ac_cv_linux_exports_init_mm)])
92 AC_DEFUN([LINUX_EXPORTS_KALLSYMS_ADDRESS], [
93 AC_MSG_CHECKING([for exported kallsyms_address_to_symbol])
94 AC_CACHE_VAL([ac_cv_linux_exports_kallsyms_address], [
96 [#include <linux/modversions.h>],
97 [#ifndef __ver_kallsyms_address_to_symbol
98 #error kallsyms_address_to_symbol not exported
100 ac_cv_linux_exports_kallsyms_address=yes,
101 ac_cv_linux_exports_kallsyms_address=no)])
102 AC_MSG_RESULT($ac_cv_linux_exports_kallsyms_address)])
105 AC_DEFUN([LINUX_EXPORTS_KALLSYMS_SYMBOL], [
106 AC_MSG_CHECKING([for exported kallsyms_symbol_to_address])
107 AC_CACHE_VAL([ac_cv_linux_exports_kallsyms_symbol], [
109 [#include <linux/modversions.h>],
110 [#ifndef __ver_kallsyms_symbol_to_address
111 #error kallsyms_symbol_to_address not exported
113 ac_cv_linux_exports_kallsyms_symbol=yes,
114 ac_cv_linux_exports_kallsyms_symbol=no)])
115 AC_MSG_RESULT($ac_cv_linux_exports_kallsyms_symbol)])
117 AC_DEFUN([LINUX_EXPORTS_SYS_CALL_TABLE], [
118 AC_MSG_CHECKING([for exported sys_call_table])
119 AC_CACHE_VAL([ac_cv_linux_exports_sys_call_table], [
121 [#include <linux/modversions.h>],
122 [#ifndef __ver_sys_call_table
123 #error sys_call_table not exported
125 ac_cv_linux_exports_sys_call_table=yes,
126 ac_cv_linux_exports_sys_call_table=no)])
127 AC_MSG_RESULT($ac_cv_linux_exports_sys_call_table)])
130 AC_DEFUN([LINUX_EXPORTS_IA32_SYS_CALL_TABLE], [
131 AC_MSG_CHECKING([for exported ia32_sys_call_table])
132 AC_CACHE_VAL([ac_cv_linux_exports_ia32_sys_call_table], [
134 [#include <linux/modversions.h>],
135 [#ifndef __ver_ia32_sys_call_table
136 #error ia32_sys_call_table not exported
138 ac_cv_linux_exports_ia32_sys_call_table=yes,
139 ac_cv_linux_exports_ia32_sys_call_table=no)])
140 AC_MSG_RESULT($ac_cv_linux_exports_ia32_sys_call_table)])
143 AC_DEFUN([LINUX_EXPORTS_SYS_CHDIR], [
144 AC_MSG_CHECKING([for exported sys_chdir])
145 AC_CACHE_VAL([ac_cv_linux_exports_sys_chdir], [
147 [extern asmlinkage long sys_chdir(void) __attribute__((weak));],
148 [void *address = &sys_chdir;
149 printk("%p\n", address);],
150 ac_cv_linux_exports_sys_chdir=yes,
151 ac_cv_linux_exports_sys_chdir=no)])
152 AC_MSG_RESULT($ac_cv_linux_exports_sys_chdir)])
155 AC_DEFUN([LINUX_EXPORTS_SYS_CLOSE], [
156 AC_MSG_CHECKING([for exported sys_close])
157 AC_CACHE_VAL([ac_cv_linux_exports_sys_close], [
159 [extern asmlinkage long sys_close(void) __attribute__((weak));],
160 [void *address = &sys_close;
161 printk("%p\n", address);],
162 ac_cv_linux_exports_sys_close=yes,
163 ac_cv_linux_exports_sys_close=no)])
164 AC_MSG_RESULT($ac_cv_linux_exports_sys_close)])
167 AC_DEFUN([LINUX_EXPORTS_SYS_OPEN], [
168 AC_MSG_CHECKING([for exported sys_open])
169 AC_CACHE_VAL([ac_cv_linux_exports_sys_open], [
171 [extern asmlinkage long sys_open(void) __attribute__((weak));],
172 [void *address = &sys_open;
173 printk("%p\n", address);],
174 ac_cv_linux_exports_sys_open=yes,
175 ac_cv_linux_exports_sys_open=no)])
176 AC_MSG_RESULT($ac_cv_linux_exports_sys_open)])
179 AC_DEFUN([LINUX_EXPORTS_SYS_WAIT4], [
180 AC_MSG_CHECKING([for exported sys_wait4])
181 AC_CACHE_VAL([ac_cv_linux_exports_sys_wait4], [
183 [extern asmlinkage long sys_wait4(void) __attribute__((weak));],
184 [void *address = &sys_wait4;
185 printk("%p\n", address);],
186 ac_cv_linux_exports_sys_wait4=yes,
187 ac_cv_linux_exports_sys_wait4=no)])
188 AC_MSG_RESULT($ac_cv_linux_exports_sys_wait4)])
191 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BLKSIZE], [
192 AC_MSG_CHECKING([for i_blksize in struct inode])
193 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_blksize], [
195 [#include <linux/fs.h>],
196 [struct inode _inode;
197 printk("%d\n", _inode.i_blksize);],
198 ac_cv_linux_fs_struct_inode_has_i_blksize=yes,
199 ac_cv_linux_fs_struct_inode_has_i_blksize=no)])
200 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_blksize)])
202 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BLKBITS], [
203 AC_MSG_CHECKING([for i_blkbits in struct inode])
204 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_blkbits], [
206 [#include <linux/fs.h>],
207 [struct inode _inode;
208 printk("%d\n", _inode.i_blkbits);],
209 ac_cv_linux_fs_struct_inode_has_i_blkbits=yes,
210 ac_cv_linux_fs_struct_inode_has_i_blkbits=no)])
211 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_blkbits)
212 if test "x$ac_cv_linux_fs_struct_inode_has_i_blkbits" = "xyes"; then
213 AC_DEFINE(STRUCT_INODE_HAS_I_BLKBITS, 1, [define if your struct inode has i_blkbits])
217 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_CDEV], [
218 AC_MSG_CHECKING([for i_cdev in struct inode])
219 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_cdev], [
221 [#include <linux/fs.h>],
222 [struct inode _inode;
223 printk("%d\n", _inode.i_cdev);],
224 ac_cv_linux_fs_struct_inode_has_i_cdev=yes,
225 ac_cv_linux_fs_struct_inode_has_i_cdev=no)])
226 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_cdev)])
229 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DEVICES], [
230 AC_MSG_CHECKING([for i_devices in struct inode])
231 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_devices], [
233 [#include <linux/fs.h>],
234 [struct inode _inode;
235 printk("%d\n", _inode.i_devices);],
236 ac_cv_linux_fs_struct_inode_has_i_devices=yes,
237 ac_cv_linux_fs_struct_inode_has_i_devices=no)])
238 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_devices)])
241 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_DIRTY_DATA_BUFFERS], [
242 AC_MSG_CHECKING([for i_dirty_data_buffers in struct inode])
243 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers], [
245 [#include <linux/fs.h>],
246 [struct inode _inode;
247 printk("%d\n", _inode.i_dirty_data_buffers);],
248 ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=yes,
249 ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers=no)])
250 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_dirty_data_buffers)])
253 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_LOCK], [
254 AC_MSG_CHECKING([for inotify_lock in struct inode])
255 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_inotify_lock], [
257 [#include <linux/fs.h>],
258 [struct inode _inode;
259 printk("%d\n", _inode.inotify_lock);],
260 ac_cv_linux_fs_struct_inode_has_inotify_lock=yes,
261 ac_cv_linux_fs_struct_inode_has_inotify_lock=no)])
262 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_lock)])
264 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_INOTIFY_SEM], [
265 AC_MSG_CHECKING([for inotify_sem in struct inode])
266 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_inotify_sem], [
268 [#include <linux/fs.h>],
269 [struct inode _inode;
270 printk("%x\n", _inode.inotify_sem);],
271 ac_cv_linux_fs_struct_inode_has_inotify_sem=yes,
272 ac_cv_linux_fs_struct_inode_has_inotify_sem=no)])
273 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_inotify_sem)])
276 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MAPPING_OVERLOAD], [
277 AC_MSG_CHECKING([for i_mapping_overload in struct inode])
278 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_mapping_overload], [
280 [#include <linux/fs.h>],
281 [struct inode _inode;
282 printk("%d\n", _inode.i_mapping_overload);],
283 ac_cv_linux_fs_struct_inode_has_i_mapping_overload=yes,
284 ac_cv_linux_fs_struct_inode_has_i_mapping_overload=no)])
285 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mapping_overload)])
288 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MMAP_SHARED], [
289 AC_MSG_CHECKING([for i_mmap_shared in struct inode])
290 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_mmap_shared], [
292 [#include <linux/fs.h>],
293 [struct inode _inode;
294 printk("%d\n", _inode.i_mmap_shared);],
295 ac_cv_linux_fs_struct_inode_has_i_mmap_shared=yes,
296 ac_cv_linux_fs_struct_inode_has_i_mmap_shared=no)])
297 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mmap_shared)])
300 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_MUTEX], [
301 AC_MSG_CHECKING([for i_mutex in struct inode])
302 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_mutex], [
304 [#include <linux/fs.h>],
305 [struct inode _inode;
306 printk("%d\n", _inode.i_mutex);],
307 ac_cv_linux_fs_struct_inode_has_i_mutex=yes,
308 ac_cv_linux_fs_struct_inode_has_i_mutex=no)])
309 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_mutex)])
312 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SECURITY], [
313 AC_MSG_CHECKING([for i_security in struct inode])
314 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_security], [
316 [#include <linux/fs.h>],
317 [struct inode _inode;
318 printk("%d\n", _inode.i_security);],
319 ac_cv_linux_fs_struct_inode_has_i_security=yes,
320 ac_cv_linux_fs_struct_inode_has_i_security=no)])
321 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_security)])
324 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_SB_LIST], [
325 AC_MSG_CHECKING([for i_sb_list in struct inode])
326 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_sb_list], [
328 [#include <linux/fs.h>],
329 [struct inode _inode;
330 printk("%d\n", _inode.i_sb_list);],
331 ac_cv_linux_fs_struct_inode_has_i_sb_list=yes,
332 ac_cv_linux_fs_struct_inode_has_i_sb_list=no)])
333 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_sb_list)])
336 AC_DEFUN([LINUX_RECALC_SIGPENDING_ARG_TYPE], [
337 AC_MSG_CHECKING([for recalc_sigpending arg type])
338 AC_CACHE_VAL([ac_cv_linux_func_recalc_sigpending_takes_void], [
340 [#include <linux/sched.h>],
341 [recalc_sigpending();],
342 ac_cv_linux_func_recalc_sigpending_takes_void=yes,
343 ac_cv_linux_func_recalc_sigpending_takes_void=no)])
344 AC_MSG_RESULT($ac_cv_linux_func_recalc_sigpending_takes_void)])
347 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_PARENT], [
348 AC_MSG_CHECKING([for parent in struct task_struct])
349 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_parent], [
351 [#include <linux/sched.h>],
352 [struct task_struct _tsk;
353 printk("%d\n", _tsk.parent);],
354 ac_cv_linux_sched_struct_task_struct_has_parent=yes,
355 ac_cv_linux_sched_struct_task_struct_has_parent=no)])
356 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_parent)])
359 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TGID], [
360 AC_MSG_CHECKING([for tgid in struct task_struct])
361 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_tgid], [
363 [#include <linux/sched.h>],
364 [struct task_struct _tsk;
365 printk("%d\n", _tsk.tgid);],
366 ac_cv_linux_sched_struct_task_struct_has_tgid=yes,
367 ac_cv_linux_sched_struct_task_struct_has_tgid=no)])
368 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_tgid)])
371 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_REAL_PARENT], [
372 AC_MSG_CHECKING([for real_parent in struct task_struct])
373 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_real_parent], [
375 [#include <linux/sched.h>],
376 [struct task_struct _tsk;
377 printk("%d\n", _tsk.real_parent);],
378 ac_cv_linux_sched_struct_task_struct_has_real_parent=yes,
379 ac_cv_linux_sched_struct_task_struct_has_real_parent=no)])
380 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_real_parent)])
383 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIG], [
384 AC_MSG_CHECKING([for sig in struct task_struct])
385 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_sig], [
387 [#include <linux/sched.h>],
388 [struct task_struct _tsk;
389 printk("%d\n", _tsk.sig);],
390 ac_cv_linux_sched_struct_task_struct_has_sig=yes,
391 ac_cv_linux_sched_struct_task_struct_has_sig=no)])
392 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sig)])
395 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGMASK_LOCK], [
396 AC_MSG_CHECKING([for sigmask_lock in struct task_struct])
397 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_sigmask_lock], [
399 [#include <linux/sched.h>],
400 [struct task_struct _tsk;
401 printk("%d\n", _tsk.sigmask_lock);],
402 ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=yes,
403 ac_cv_linux_sched_struct_task_struct_has_sigmask_lock=no)])
404 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sigmask_lock)])
407 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGHAND], [
408 AC_MSG_CHECKING([for sighand in struct task_struct])
409 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_sighand], [
411 [#include <linux/sched.h>],
412 [struct task_struct _tsk;
413 printk("%d\n", _tsk.sighand);],
414 ac_cv_linux_sched_struct_task_struct_has_sighand=yes,
415 ac_cv_linux_sched_struct_task_struct_has_sighand=no)])
416 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_sighand)])
419 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_RLIM], [
420 AC_MSG_CHECKING([for rlim in struct task_struct])
421 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_rlim], [
423 [#include <linux/sched.h>],
424 [struct task_struct _tsk;
425 printk("%d\n", _tsk.rlim);],
426 ac_cv_linux_sched_struct_task_struct_has_rlim=yes,
427 ac_cv_linux_sched_struct_task_struct_has_rlim=no)])
428 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_rlim)])
431 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_SIGNAL_RLIM], [
432 AC_MSG_CHECKING([for signal->rlim in struct task_struct])
433 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_signal_rlim], [
435 [#include <linux/sched.h>],
436 [struct task_struct _tsk;
437 printk("%d\n", _tsk.signal->rlim);],
438 ac_cv_linux_sched_struct_task_struct_has_signal_rlim=yes,
439 ac_cv_linux_sched_struct_task_struct_has_signal_rlim=no)])
440 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_signal_rlim)])
443 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_EXIT_STATE], [
444 AC_MSG_CHECKING([for exit_state in struct task_struct])
445 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_exit_state], [
447 [#include <linux/sched.h>],
448 [struct task_struct _tsk;
449 printk("%d\n", _tsk.exit_state);],
450 ac_cv_linux_sched_struct_task_struct_has_exit_state=yes,
451 ac_cv_linux_sched_struct_task_struct_has_exit_state=no)])
452 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_exit_state)])
455 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_THREAD_INFO], [
456 AC_MSG_CHECKING([for thread_info in struct task_struct])
457 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_thread_info], [
459 [#include <linux/sched.h>],
460 [struct task_struct _tsk;
461 printk("%d\n", _tsk.thread_info);],
462 ac_cv_linux_sched_struct_task_struct_has_thread_info=yes,
463 ac_cv_linux_sched_struct_task_struct_has_thread_info=no)])
464 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_thread_info)])
467 AC_DEFUN([LINUX_FS_STRUCT_SUPER_HAS_ALLOC_INODE], [
468 AC_MSG_CHECKING([for alloc_inode in struct super_operations])
469 AC_CACHE_VAL([ac_cv_linux_fs_struct_super_has_alloc_inode], [
471 [#include <linux/fs.h>],
472 [struct super_operations _super;
473 printk("%p\n", _super.alloc_inode);],
474 ac_cv_linux_fs_struct_super_has_alloc_inode=yes,
475 ac_cv_linux_fs_struct_super_has_alloc_inode=no)])
476 AC_MSG_RESULT($ac_cv_linux_fs_struct_super_has_alloc_inode)])
479 AC_DEFUN([LINUX_KERNEL_POSIX_LOCK_FILE_WAIT_ARG], [
480 AC_MSG_CHECKING([for 3rd argument in posix_lock_file found in new kernels])
481 AC_CACHE_VAL([ac_cv_linux_kernel_posix_lock_file_wait_arg], [
483 [#include <linux/fs.h>],
484 [posix_lock_file(0,0,0);],
485 ac_cv_linux_kernel_posix_lock_file_wait_arg=yes,
486 ac_cv_linux_kernel_posix_lock_file_wait_arg=no)])
487 AC_MSG_RESULT($ac_cv_linux_kernel_posix_lock_file_wait_arg)])
490 AC_DEFUN([LINUX_KERNEL_SOCK_CREATE], [
491 AC_MSG_CHECKING([for 5th argument in sock_create found in some SELinux kernels])
492 AC_CACHE_VAL([ac_cv_linux_kernel_sock_create_v], [
494 [#include <linux/net.h>],
495 [sock_create(0,0,0,0,0);],
496 ac_cv_linux_kernel_sock_create_v=yes,
497 ac_cv_linux_kernel_sock_create_v=no)])
498 AC_MSG_RESULT($ac_cv_linux_kernel_sock_create_v)])
501 AC_DEFUN([LINUX_KERNEL_PAGE_FOLLOW_LINK], [
502 AC_MSG_CHECKING([for page_follow_link_light vs page_follow_link])
503 AC_CACHE_VAL([ac_cv_linux_kernel_page_follow_link], [
504 save_CPPFLAGS="$CPPFLAGS"
505 CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
507 [#include <linux/fs.h>],
508 [page_follow_link(0,0);],
509 ac_cv_linux_kernel_page_follow_link=yes,
510 ac_cv_linux_kernel_page_follow_link=no)
511 CPPFLAGS="$save_CPPFLAGS"])
512 AC_MSG_RESULT($ac_cv_linux_kernel_page_follow_link)])
514 AC_DEFUN([LINUX_KERNEL_HLIST_UNHASHED], [
515 AC_MSG_CHECKING([for hlist_unhashed])
516 AC_CACHE_VAL([ac_cv_linux_kernel_hlist_unhashed], [
517 save_CPPFLAGS="$CPPFLAGS"
518 CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
520 [#include <linux/list.h>],
521 [hlist_unhashed(0);],
522 ac_cv_linux_kernel_hlist_unhashed=yes,
523 ac_cv_linux_kernel_hlist_unhashed=no)
524 CPPFLAGS="$save_CPPFLAGS"])
525 AC_MSG_RESULT($ac_cv_linux_kernel_hlist_unhashed)])
527 AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_GFP_MASK], [
528 AC_MSG_CHECKING([for gfp_mask in struct address_space])
529 AC_CACHE_VAL([ac_cv_linux_fs_struct_address_space_has_gfp_mask], [
531 [#include <linux/fs.h>],
532 [struct address_space _a;
533 printk("%d\n", _a.gfp_mask);],
534 ac_cv_linux_fs_struct_address_space_has_gfp_mask=yes,
535 ac_cv_linux_fs_struct_address_space_has_gfp_mask=no)])
536 AC_MSG_RESULT($ac_cv_linux_fs_struct_address_space_has_gfp_mask)])
539 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_BYTES], [
540 AC_MSG_CHECKING([for i_bytes in struct inode])
541 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_bytes], [
543 [#include <linux/fs.h>],
544 [struct inode _inode;
545 printk("%d\n", _inode.i_bytes);],
546 ac_cv_linux_fs_struct_inode_has_i_bytes=yes,
547 ac_cv_linux_fs_struct_inode_has_i_bytes=no)])
548 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_bytes)])
551 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_ALLOC_SEM], [
552 AC_MSG_CHECKING([for i_alloc_sem in struct inode])
553 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_alloc_sem], [
555 [#include <linux/fs.h>],
557 printk("%x\n", _i.i_alloc_sem);],
558 ac_cv_linux_fs_struct_inode_has_i_alloc_sem=yes,
559 ac_cv_linux_fs_struct_inode_has_i_alloc_sem=no)])
560 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_alloc_sem)])
563 AC_DEFUN([LINUX_FS_STRUCT_INODE_HAS_I_TRUNCATE_SEM], [
564 AC_MSG_CHECKING([for i_truncate_sem in struct inode])
565 AC_CACHE_VAL([ac_cv_linux_fs_struct_inode_has_i_truncate_sem], [
567 [#include <linux/fs.h>],
569 printk("%x\n", _i.i_truncate_sem);],
570 ac_cv_linux_fs_struct_inode_has_i_truncate_sem=yes,
571 ac_cv_linux_fs_struct_inode_has_i_truncate_sem=no)])
572 AC_MSG_RESULT($ac_cv_linux_fs_struct_inode_has_i_truncate_sem)])
575 AC_DEFUN([LINUX_FS_STRUCT_ADDRESS_SPACE_HAS_PAGE_LOCK], [
576 AC_MSG_CHECKING([for page_lock in struct address_space])
577 AC_CACHE_VAL([ac_cv_linux_fs_struct_address_space_has_page_lock], [
579 [#include <linux/fs.h>],
580 [struct address_space _a_s;
581 printk("%x\n", _a_s.page_lock);],
582 ac_cv_linux_fs_struct_address_space_has_page_lock=yes,
583 ac_cv_linux_fs_struct_address_space_has_page_lock=no)])
584 AC_MSG_RESULT($ac_cv_linux_fs_struct_address_space_has_page_lock)])
587 AC_DEFUN([LINUX_INODE_SETATTR_RETURN_TYPE], [
588 AC_MSG_CHECKING([for inode_setattr return type])
589 AC_CACHE_VAL([ac_cv_linux_func_inode_setattr_returns_int], [
591 [#include <linux/fs.h>],
592 [struct inode _inode;
595 i = inode_setattr(&_inode, &_iattr);],
596 ac_cv_linux_func_inode_setattr_returns_int=yes,
597 ac_cv_linux_func_inode_setattr_returns_int=no)])
598 AC_MSG_RESULT($ac_cv_linux_func_inode_setattr_returns_int)])
601 AC_DEFUN([LINUX_WRITE_INODE_RETURN_TYPE], [
602 AC_MSG_CHECKING([for write_inode return type])
603 AC_CACHE_VAL([ac_cv_linux_func_write_inode_returns_int], [
605 [#include <linux/fs.h>],
606 [struct inode _inode;
607 struct super_operations _sops;
609 i = _sops.write_inode(&_inode, 0);],
610 ac_cv_linux_func_write_inode_returns_int=yes,
611 ac_cv_linux_func_write_inode_returns_int=no)])
612 AC_MSG_RESULT($ac_cv_linux_func_write_inode_returns_int)])
615 AC_DEFUN([LINUX_AOP_WRITEBACK_CONTROL], [
616 AC_MSG_CHECKING([whether address_space_operations.writepage takes a writeback_control])
617 AC_CACHE_VAL([ac_cv_linux_func_a_writepage_takes_writeback_control], [
619 [#include <linux/fs.h>
620 #include <linux/mm.h>
621 #include <linux/writeback.h>],
622 [struct address_space_operations _aops;
624 struct writeback_control _writeback_control;
625 (void)_aops.writepage(&_page, &_writeback_control);],
626 ac_cv_linux_func_a_writepage_takes_writeback_control=yes,
627 ac_cv_linux_func_a_writepage_takes_writeback_control=no)])
628 AC_MSG_RESULT($ac_cv_linux_func_a_writepage_takes_writeback_control)])
631 AC_DEFUN([LINUX_REFRIGERATOR], [
632 AC_MSG_CHECKING([whether refrigerator takes PF_FREEZE])
633 AC_CACHE_VAL([ac_cv_linux_func_refrigerator_takes_pf_freeze], [
635 [#include <linux/sched.h>
636 #ifdef FREEZER_H_EXISTS
637 #include <linux/freezer.h>
639 [refrigerator(PF_FREEZE);],
640 ac_cv_linux_func_refrigerator_takes_pf_freeze=yes,
641 ac_cv_linux_func_refrigerator_takes_pf_freeze=no)])
642 AC_MSG_RESULT($ac_cv_linux_func_refrigerator_takes_pf_freeze)])
645 AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_NAMEIDATA], [
646 AC_MSG_CHECKING([whether inode_operations.create takes a nameidata])
647 AC_CACHE_VAL([ac_cv_linux_func_i_create_takes_nameidata], [
649 [#include <linux/fs.h>
650 #include <linux/namei.h>],
651 [struct inode _inode;
652 struct dentry _dentry;
653 struct nameidata _nameidata;
654 (void)_inode.i_op->create(&_inode, &_dentry, 0, &_nameidata);],
655 ac_cv_linux_func_i_create_takes_nameidata=yes,
656 ac_cv_linux_func_i_create_takes_nameidata=no)])
657 AC_MSG_RESULT($ac_cv_linux_func_i_create_takes_nameidata)])
660 AC_DEFUN([LINUX_IOP_I_LOOKUP_TAKES_NAMEIDATA], [
661 AC_MSG_CHECKING([whether inode_operations.lookup takes a nameidata])
662 AC_CACHE_VAL([ac_cv_linux_func_i_lookup_takes_nameidata], [
664 [#include <linux/fs.h>
665 #include <linux/namei.h>],
666 [struct inode _inode;
667 struct dentry _dentry;
668 struct nameidata _nameidata;
669 (void)_inode.i_op->lookup(&_inode, &_dentry, &_nameidata);],
670 ac_cv_linux_func_i_lookup_takes_nameidata=yes,
671 ac_cv_linux_func_i_lookup_takes_nameidata=no)])
672 AC_MSG_RESULT($ac_cv_linux_func_i_lookup_takes_nameidata)])
675 AC_DEFUN([LINUX_IOP_I_PERMISSION_TAKES_NAMEIDATA], [
676 AC_MSG_CHECKING([whether inode_operations.permission takes a nameidata])
677 AC_CACHE_VAL([ac_cv_linux_func_i_permission_takes_nameidata], [
679 [#include <linux/fs.h>
680 #include <linux/namei.h>],
681 [struct inode _inode;
682 struct dentry _dentry;
683 struct nameidata _nameidata;
684 (void)_inode.i_op->permission(&_inode, 0, &_nameidata);],
685 ac_cv_linux_func_i_permission_takes_nameidata=yes,
686 ac_cv_linux_func_i_permission_takes_nameidata=no)])
687 AC_MSG_RESULT($ac_cv_linux_func_i_permission_takes_nameidata)])
690 AC_DEFUN([LINUX_IOP_I_PUT_LINK_TAKES_COOKIE], [
691 AC_MSG_CHECKING([whether inode_operations.put_link takes an opaque cookie])
692 AC_CACHE_VAL([ac_cv_linux_func_i_put_link_takes_cookie], [
694 [#include <linux/fs.h>
695 #include <linux/namei.h>],
696 [struct inode _inode;
697 struct dentry _dentry;
698 struct nameidata _nameidata;
700 (void)_inode.i_op->put_link(&_dentry, &_nameidata, cookie);],
701 ac_cv_linux_func_i_put_link_takes_cookie=yes,
702 ac_cv_linux_func_i_put_link_takes_cookie=no)])
703 AC_MSG_RESULT($ac_cv_linux_func_i_put_link_takes_cookie)])
706 AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_NAMEIDATA], [
707 AC_MSG_CHECKING([whether dentry_operations.d_revalidate takes a nameidata])
708 AC_CACHE_VAL([ac_cv_linux_func_d_revalidate_takes_nameidata], [
710 [#include <linux/fs.h>
711 #include <linux/namei.h>],
712 [struct dentry _dentry;
713 struct nameidata _nameidata;
714 (void)_dentry.d_op->d_revalidate(&_dentry, &_nameidata);],
715 ac_cv_linux_func_d_revalidate_takes_nameidata=yes,
716 ac_cv_linux_func_d_revalidate_takes_nameidata=no)])
717 AC_MSG_RESULT($ac_cv_linux_func_d_revalidate_takes_nameidata)])
719 AC_DEFUN([LINUX_GET_SB_HAS_STRUCT_VFSMOUNT], [
720 AC_MSG_CHECKING([for struct vfsmount * in get_sb_nodev()])
721 AC_CACHE_VAL([ac_cv_linux_get_sb_has_struct_vfsmount], [
723 [#include <linux/fs.h>],
724 [get_sb_nodev(0,0,0,0,0);],
725 ac_cv_linux_get_sb_has_struct_vfsmount=yes,
726 ac_cv_linux_get_sb_has_struct_vfsmount=no)])
727 AC_MSG_RESULT($ac_cv_linux_get_sb_has_struct_vfsmount)])
729 AC_DEFUN([LINUX_STATFS_TAKES_DENTRY], [
730 AC_MSG_CHECKING([for dentry in statfs])
731 AC_CACHE_VAL([ac_cv_linux_statfs_takes_dentry], [
733 [#include <linux/fs.h>
734 #include <linux/statfs.h>],
736 extern int vfs_statfs(struct dentry *, struct kstatfs *);
738 ac_cv_linux_statfs_takes_dentry=yes,
739 ac_cv_linux_statfs_takes_dentry=no)])
740 AC_MSG_RESULT($ac_cv_linux_statfs_takes_dentry)])
743 AC_DEFUN([LINUX_KEY_TYPE_H_EXISTS], [
744 AC_MSG_CHECKING([for linux/key-type.h existance])
745 AC_CACHE_VAL([ac_cv_linux_key_type_h_exists], [
747 [#include <linux/key-type.h>],
749 ac_cv_linux_key_type_h_exists=yes,
750 ac_cv_linux_key_type_h_exists=no)])
751 AC_MSG_RESULT($ac_cv_linux_key_type_h_exists)
752 if test "x$ac_cv_linux_key_type_h_exists" = "xyes"; then
753 AC_DEFINE([KEY_TYPE_H_EXISTS], 1, [define if linux/key-type.h exists])
756 AC_DEFUN([LINUX_LINUX_KEYRING_SUPPORT], [
757 AC_MSG_CHECKING([for linux kernel keyring support])
758 AC_CACHE_VAL([ac_cv_linux_keyring_support], [
760 [#include <linux/rwsem.h>
761 #ifdef KEY_TYPE_H_EXISTS
762 #include <linux/key-type.h>
764 #include <linux/key.h>
765 #include <linux/keyctl.h>],
767 request_key(NULL, NULL, NULL);
768 #if !defined(KEY_POS_VIEW) || !defined(KEY_POS_SEARCH) || !defined(KEY_POS_SETATTR)
769 #error "Your linux/key.h does not contain KEY_POS_VIEW or KEY_POS_SEARCH or KEY_POS_SETATTR"
772 #error rebuild your kernel with CONFIG_KEYS
774 ac_cv_linux_keyring_support=yes,
775 ac_cv_linux_keyring_support=no)])
776 AC_MSG_RESULT($ac_cv_linux_keyring_support)
777 if test "x$ac_cv_linux_keyring_support" = "xyes"; then
778 AC_DEFINE([LINUX_KEYRING_SUPPORT], 1, [define if your kernel has keyring support])
781 AC_DEFUN([LINUX_KEY_ALLOC_NEEDS_STRUCT_TASK], [
782 AC_MSG_CHECKING([if key_alloc() takes a struct task *])
783 AC_CACHE_VAL([ac_cv_key_alloc_needs_struct_task], [
785 [#include <linux/rwsem.h>
786 #include <linux/key.h>
788 [(void) key_alloc(NULL, NULL, 0, 0, NULL, 0, 0);],
789 ac_cv_key_alloc_needs_struct_task=yes,
790 ac_cv_key_alloc_needs_struct_task=no)])
791 AC_MSG_RESULT($ac_cv_key_alloc_needs_struct_task)
792 if test "x$ac_cv_key_alloc_needs_struct_task" = "xyes"; then
793 AC_DEFINE([KEY_ALLOC_NEEDS_STRUCT_TASK], 1, [define if key_alloc takes a struct task *])
796 AC_DEFUN([LINUX_DO_SYNC_READ], [
797 AC_MSG_CHECKING([for linux do_sync_read()])
798 AC_CACHE_VAL([ac_cv_linux_do_sync_read], [
799 save_CPPFLAGS="$CPPFLAGS"
800 CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
802 [#include <linux/fs.h>],
803 [do_sync_read(NULL, NULL, 0, NULL);],
804 ac_cv_linux_do_sync_read=yes,
805 ac_cv_linux_do_sync_read=no)
806 CPPFLAGS="$save_CPPFLAGS"])
807 AC_MSG_RESULT($ac_cv_linux_do_sync_read)
808 if test "x$ac_cv_linux_do_sync_read" = "xyes"; then
809 AC_DEFINE([DO_SYNC_READ], 1, [define if your kernel has do_sync_read()])
812 AC_DEFUN([LINUX_GENERIC_FILE_AIO_READ], [
813 AC_MSG_CHECKING([for linux generic_file_aio_read()])
814 AC_CACHE_VAL([ac_cv_linux_generic_file_aio_read], [
815 save_CPPFLAGS="$CPPFLAGS"
816 CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
818 [#include <linux/fs.h>],
819 [generic_file_aio_read(NULL, NULL, 0, 0);],
820 ac_cv_linux_generic_file_aio_read=yes,
821 ac_cv_linux_generic_file_aio_read=no)
822 CPPFLAGS="$save_CPPFLAGS"])
823 AC_MSG_RESULT($ac_cv_linux_generic_file_aio_read)
824 if test "x$ac_cv_linux_generic_file_aio_read" = "xyes"; then
825 AC_DEFINE([GENERIC_FILE_AIO_READ], 1, [define if your kernel has generic_file_aio_read()])
828 AC_DEFUN([LINUX_FREEZER_H_EXISTS], [
829 AC_MSG_CHECKING([for linux/freezer.h existance])
830 AC_CACHE_VAL([ac_cv_linux_freezer_h_exists], [
832 [#include <linux/freezer.h>],
834 ac_cv_linux_freezer_h_exists=yes,
835 ac_cv_linux_freezer_h_exists=no)])
836 AC_MSG_RESULT($ac_cv_linux_freezer_h_exists)
837 if test "x$ac_cv_linux_freezer_h_exists" = "xyes"; then
838 AC_DEFINE([FREEZER_H_EXISTS], 1, [define if linux/freezer.h exists])
841 AC_DEFUN([LINUX_SCHED_STRUCT_TASK_STRUCT_HAS_TODO], [
842 AC_MSG_CHECKING([for todo in struct task_struct])
843 AC_CACHE_VAL([ac_cv_linux_sched_struct_task_struct_has_todo], [
845 [#include <linux/sched.h>],
846 [struct task_struct _tsk;
847 printk("%d\n", _tsk.todo);],
848 ac_cv_linux_sched_struct_task_struct_has_todo=yes,
849 ac_cv_linux_sched_struct_task_struct_has_todo=no)])
850 AC_MSG_RESULT($ac_cv_linux_sched_struct_task_struct_has_todo)])
852 AC_DEFUN([LINUX_INIT_WORK_HAS_DATA], [
853 AC_MSG_CHECKING([whether INIT_WORK has a _data argument])
854 AC_CACHE_VAL([ac_cv_linux_init_work_has_data], [
856 [#include <linux/kernel.h>
857 #include <linux/workqueue.h>],
859 void f(struct work_struct *w) {}
860 struct work_struct *w;
863 ac_cv_linux_init_work_has_data=yes,
864 ac_cv_linux_init_work_has_data=no)])
865 AC_MSG_RESULT($ac_cv_linux_init_work_has_data)])
868 AC_DEFUN([LINUX_FS_STRUCT_FOP_HAS_FLOCK], [
869 AC_MSG_CHECKING([for flock in struct file_operations])
870 AC_CACHE_VAL([ac_cv_linux_fs_struct_fop_has_flock], [
872 [#include <linux/fs.h>],
873 [struct file_operations _fop;
874 _fop.flock(NULL, 0, NULL);],
875 ac_cv_linux_fs_struct_fop_has_flock=yes,
876 ac_cv_linux_fs_struct_fop_has_flock=no)])
877 AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_flock)])
879 AC_DEFUN([LINUX_REGISTER_SYSCTL_TABLE_NOFLAG], [
880 AC_MSG_CHECKING([whether register_sysctl_table has an insert_at_head flag argument])
881 AC_CACHE_VAL([ac_cv_linux_register_sysctl_table_noflag], [
883 [#include <linux/sysctl.h>],
885 register_sysctl_table (t);],
886 ac_cv_linux_register_sysctl_table_noflag=yes,
887 ac_cv_linux_register_sysctl_table_noflag=no)])
888 AC_MSG_RESULT($ac_cv_linux_register_sysctl_table_noflag)])
890 AC_DEFUN([LINUX_FOP_F_FLUSH_TAKES_FL_OWNER_T], [
891 AC_MSG_CHECKING([whether file_operations.flush takes a fl_owner_t])
892 AC_CACHE_VAL([ac_cv_linux_func_f_flush_takes_fl_owner_t], [
894 [#include <linux/fs.h>],
895 [struct inode _inode;
898 (void)_inode.i_fop->flush(&_file, &id);],
899 ac_cv_linux_func_f_flush_takes_fl_owner_t=yes,
900 ac_cv_linux_func_f_flush_takes_fl_owner_t=no)])
901 AC_MSG_RESULT($ac_cv_linux_func_f_flush_takes_fl_owner_t)])
903 AC_DEFUN([LINUX_HAVE_KMEM_CACHE_T], [
904 AC_MSG_CHECKING([whether kmem_cache_t exists])
905 AC_CACHE_VAL([ac_cv_linux_have_kmem_cache_t], [
907 [#include <linux/slab.h>],
909 ac_cv_linux_have_kmem_cache_t=yes,
910 ac_cv_linux_have_kmem_cache_t=no)])
911 AC_MSG_RESULT($ac_cv_linux_have_kmem_cache_t)])
913 AC_DEFUN([LINUX_KMEM_CACHE_CREATE_TAKES_DTOR], [
914 AC_MSG_CHECKING([whether kmem_cache_create takes a destructor argument])
915 AC_CACHE_VAL([ac_cv_linux_kmem_cache_create_takes_dtor], [
917 [#include <linux/slab.h>],
918 [kmem_cache_create(NULL, 0, 0, 0, NULL, NULL);],
919 ac_cv_linux_kmem_cache_create_takes_dtor=yes,
920 ac_cv_linux_kmem_cache_create_takes_dtor=no)])
921 AC_MSG_RESULT($ac_cv_linux_kmem_cache_create_takes_dtor)])
923 AC_DEFUN([LINUX_FS_STRUCT_FOP_HAS_SENDFILE], [
924 AC_MSG_CHECKING([for sendfile in struct file_operations])
925 AC_CACHE_VAL([ac_cv_linux_fs_struct_fop_has_sendfile], [
927 [#include <linux/fs.h>],
928 [struct file_operations _fop;
929 _fop.sendfile(NULL, NULL, 0, 0, NULL);],
930 ac_cv_linux_fs_struct_fop_has_sendfile=yes,
931 ac_cv_linux_fs_struct_fop_has_sendfile=no)])
932 AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_sendfile)])
934 AC_DEFUN([LINUX_HAVE_SVC_ADDR_IN], [
935 AC_MSG_CHECKING([whether svc_addr_in exists])
936 AC_CACHE_VAL([ac_cv_linux_have_svc_addr_in], [
938 [#include <linux/sunrpc/svc.h>],
939 [svc_addr_in(NULL);],
940 ac_cv_linux_have_svc_addr_in=yes,
941 ac_cv_linux_have_svc_addr_in=no)])
942 AC_MSG_RESULT($ac_cv_linux_have_svc_addr_in)])
944 AC_DEFUN([LINUX_FS_STRUCT_FOP_HAS_SPLICE], [
945 AC_MSG_CHECKING([for splice_write and splice_read in struct file_operations])
946 AC_CACHE_VAL([ac_cv_linux_fs_struct_fop_has_splice], [
948 [#include <linux/fs.h>],
949 [struct file_operations _fop;
950 _fop.splice_write(NULL, NULL, NULL, 0, 0);
951 _fop.splice_read(NULL, NULL, NULL, 0, 0);],
952 ac_cv_linux_fs_struct_fop_has_splice=yes,
953 ac_cv_linux_fs_struct_fop_has_splice=no)])
954 AC_MSG_RESULT($ac_cv_linux_fs_struct_fop_has_splice)])
956 AC_DEFUN([LINUX_HAVE_CURRENT_KERNEL_TIME], [
957 AC_MSG_CHECKING([for current_kernel_time()])
958 AC_CACHE_VAL([ac_cv_linux_have_current_kernel_time], [
960 [#include <linux/time.h>],
961 [struct timespec s = current_kernel_time();],
962 ac_cv_linux_have_current_kernel_time=yes,
963 ac_cv_linux_have_current_kernel_time=no)])
964 AC_MSG_RESULT($ac_cv_linux_have_current_kernel_time)])
966 AC_DEFUN([LINUX_KMEM_CACHE_INIT], [
967 AC_MSG_CHECKING([for new kmem_cache init function parameters])
968 AC_CACHE_VAL([ac_cv_linux_kmem_cache_init], [
970 [#include <linux/slab.h>],
971 [extern struct kmem_cache *kmem_cache_create(const char *, size_t, size_t,
973 void (*)(struct kmem_cache *, void *));
975 ac_cv_linux_kmem_cache_init=yes,
976 ac_cv_linux_kmem_cache_init=no)])
977 AC_MSG_RESULT($ac_cv_linux_kmem_cache_init)])
979 AC_DEFUN([LINUX_SYSCTL_TABLE_CHECKING], [
980 AC_MSG_CHECKING([for sysctl table checking])
981 AC_CACHE_VAL([ac_cv_linux_sysctl_table_checking], [
983 [#include <linux/sysctl.h>],
984 [ extern int sysctl_check_table(int) __attribute__((weak));
985 sysctl_check_table(NULL);],
986 ac_cv_linux_sysctl_table_checking=no,
987 ac_cv_linux_sysctl_table_checking=yes)])
988 AC_MSG_RESULT($ac_cv_linux_sysctl_table_checking)])
990 AC_DEFUN([LINUX_HAVE_IGET], [
991 AC_MSG_CHECKING([for linux iget()])
992 AC_CACHE_VAL([ac_cv_linux_have_iget], [
993 save_CPPFLAGS="$CPPFLAGS"
994 CPPFLAGS="$CPPFLAGS -Werror-implicit-function-declaration"
996 [#include <linux/fs.h>],
998 ac_cv_linux_have_iget=yes,
999 ac_cv_linux_have_iget=no)
1000 CPPFLAGS="$save_CPPFLAGS"])
1001 AC_MSG_RESULT($ac_cv_linux_have_iget)])
1003 AC_DEFUN([LINUX_FS_STRUCT_NAMEIDATA_HAS_PATH], [
1004 AC_MSG_CHECKING([for path in struct nameidata])
1005 AC_CACHE_VAL([ac_cv_linux_struct_nameidata_has_path], [
1007 [#include <linux/namei.h>],
1008 [struct nameidata _nd;
1009 printk("%x\n", _nd.path);],
1010 ac_cv_linux_struct_nameidata_has_path=yes,
1011 ac_cv_linux_struct_nameidata_has_path=no)])
1012 AC_MSG_RESULT($ac_cv_linux_struct_nameidata_has_path)])
1014 AC_DEFUN([LINUX_EXPORTS_RCU_READ_LOCK], [
1015 AC_MSG_CHECKING([if rcu_read_lock is usable])
1016 AC_CACHE_VAL([ac_cv_linux_exports_rcu_read_lock], [
1018 [#include <linux/rcupdate.h>],
1020 ac_cv_linux_exports_rcu_read_lock=yes,
1021 ac_cv_linux_exports_rcu_read_lock=no)])
1022 AC_MSG_RESULT($ac_cv_linux_exports_rcu_read_lock)
1023 if test "x$ac_cv_linux_exports_rcu_read_lock" = "xyes"; then
1024 AC_DEFINE([EXPORTED_RCU_READ_LOCK], 1, [define if rcu_read_lock() is usable])