summaryrefslogtreecommitdiff
path: root/inotify-syscalls.h
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2007-04-18 12:28:08 +0200
committerTobias Klauser <tklauser@xenon.tklauser.home>2007-04-18 12:28:08 +0200
commitad7e695784296d9e4058ebe5e27a20864076f53b (patch)
tree7f64de06f67014e85c8c8d6775f5cdd36297049d /inotify-syscalls.h
parentdc080389b64a88ac58385642e5388fc9763be575 (diff)
Update sourec for inotail 0.30.3-1
Diffstat (limited to 'inotify-syscalls.h')
-rw-r--r--inotify-syscalls.h32
1 files changed, 18 insertions, 14 deletions
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 <tklauser@distanz.ch>
+ * Copyright (c) 2006-2007 Tobias Klauser <tklauser@distanz.ch>
*/
#ifndef _LINUX_INOTIFY_SYSCALLS_H
#define _LINUX_INOTIFY_SYSCALLS_H
#include <sys/syscall.h>
-
+/* 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 */