From ad7e695784296d9e4058ebe5e27a20864076f53b Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Wed, 18 Apr 2007 12:28:08 +0200 Subject: Update sourec for inotail 0.3 --- inotify-syscalls.h | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'inotify-syscalls.h') diff --git a/inotify-syscalls.h b/inotify-syscalls.h index a1d5408..69144cb 100644 --- a/inotify-syscalls.h +++ b/inotify-syscalls.h @@ -4,14 +4,15 @@ * * Licensed under the terms of the GNU General Public License Version 2. * - * Copyright (c) 2006 Tobias Klauser + * Copyright (c) 2006-2007 Tobias Klauser */ #ifndef _LINUX_INOTIFY_SYSCALLS_H #define _LINUX_INOTIFY_SYSCALLS_H #include - +/* glibc already defines them for some architectures */ +#ifndef __NR_inotify_init #if defined(__i386__) # define __NR_inotify_init 291 # define __NR_inotify_add_watch 292 @@ -41,12 +42,6 @@ # define __NR_inotify_add_watch 152 # define __NR_inotify_rm_watch 156 #elif defined (__arm__) -# define __NR_OABI_SYSCALL_BASE 0x900000 -# if defined(__thumb__) || defined(__ARM_EABI__) -# define __NR_SYSCALL_BASE 0 -# else -# define __NR_SYSCALL_BASE __NR_OABI_SYSCALL_BASE -# endif # define __NR_inotify_init (__NR_SYSCALL_BASE + 316) # define __NR_inotify_add_watch (__NR_SYSCALL_BASE + 317) # define __NR_inotify_rm_watch (__NR_SYSCALL_BASE + 318) @@ -54,6 +49,10 @@ # define __NR_inotify_init 290 # define __NR_inotify_add_watch 291 # define __NR_inotify_rm_watch 292 +#elif defined (__m32r__) +# define __NR_inotify_init 290 +# define __NR_inotify_add_watch 291 +# define __NR_inotify_rm_watch 292 #elif defined (__hppa__) # define __NR_inotify_init 269 # define __NR_inotify_add_watch 270 @@ -76,23 +75,28 @@ # define __NR_inotify_add_watch (__NR_Linux + 248) # define __NR_inotify_rm_watch (__NR_Linux + 249) # endif +#elif defined (__m68k__) +# define __NR_inotify_init 284 +# define __NR_inotify_add_watch 285 +# define __NR_inotify_rm_watch 286 #else # error "inotify not supported on this architecture!" #endif +#endif /* __NR_inotify_init */ -static inline int inotify_init (void) +static inline int inotify_init(void) { - return syscall (__NR_inotify_init); + return syscall(__NR_inotify_init); } -static inline int inotify_add_watch (int fd, const char *name, __u32 mask) +static inline int inotify_add_watch(int fd, const char *name, __u32 mask) { - return syscall (__NR_inotify_add_watch, fd, name, mask); + return syscall(__NR_inotify_add_watch, fd, name, mask); } -static inline int inotify_rm_watch (int fd, __u32 wd) +static inline int inotify_rm_watch(int fd, __u32 wd) { - return syscall (__NR_inotify_rm_watch, fd, wd); + return syscall(__NR_inotify_rm_watch, fd, wd); } #endif /* _LINUX_INOTIFY_SYSCALLS_H */ -- cgit v1.2.3-54-g00ecf 'search' size='10' name='q' value=''/>
diff options
context:
space:
mode: