Author: rmottola
Date: Tue May 26 01:52:08 2015
New Revision: 38545

URL: http://svn.gna.org/viewcvs/gnustep?rev=38545&view=rev
Log:
Use linux inotify, remove local copy, as suggested by Adrian Bunk

Removed:
    apps/gworkspace/trunk/Tools/fswatcher/local_inotify.h
    apps/gworkspace/trunk/Tools/fswatcher/local_inotify_syscalls.h
Modified:
    apps/gworkspace/trunk/ChangeLog
    apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.h

Modified: apps/gworkspace/trunk/ChangeLog
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/ChangeLog?rev=38545&r1=38544&r2=38545&view=diff
==============================================================================
--- apps/gworkspace/trunk/ChangeLog     (original)
+++ apps/gworkspace/trunk/ChangeLog     Tue May 26 01:52:08 2015
@@ -1,3 +1,12 @@
+2015-05-26 Riccardo Mottola <[email protected]>
+
+       * Tools/fswatcher/fswatcher-inotify.h
+       Use linux inotify, as suggested by Adrian Bunk
+
+       * Tools/fswatcher/local_inotify.h
+       * Tools/fswatcher/local_inotify_syscalls.h
+       Deleted local copy
+
 2015-05-12 Riccardo Mottola <[email protected]>
 
        * configure.ac

Modified: apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.h
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.h?rev=38545&r1=38544&r2=38545&view=diff
==============================================================================
--- apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.h   (original)
+++ apps/gworkspace/trunk/Tools/fswatcher/fswatcher-inotify.h   Tue May 26 
01:52:08 2015
@@ -26,8 +26,7 @@
 #define FSWATCHER_INOTIFY_H
 
 #include <sys/types.h>
-#include "local_inotify.h"
-#include "local_inotify_syscalls.h"
+#include <sys/inotify.h>
 #include <Foundation/Foundation.h>
 #include "DBKPathsTree.h"
 

Removed: apps/gworkspace/trunk/Tools/fswatcher/local_inotify.h
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Tools/fswatcher/local_inotify.h?rev=38544&view=auto
==============================================================================
--- apps/gworkspace/trunk/Tools/fswatcher/local_inotify.h       (original)
+++ apps/gworkspace/trunk/Tools/fswatcher/local_inotify.h       (removed)
@@ -1,112 +0,0 @@
-/* Copyright (C) 2005 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Lesser General Public
-   License as published by the Free Software Foundation; either
-   version 2.1 of the License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Lesser General Public License for more details.
-
-   You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
-
-#ifndef        _LINUX_INOTIFY_H
-#define        _LINUX_INOTIFY_H
-
-#include <linux/types.h>
-
-/* Structure describing an inotify event.  */
-struct inotify_event {
-       __s32           wd;             /* watch descriptor */
-       __u32           mask;           /* watch mask */
-       __u32           cookie;         /* cookie to synchronize two events */
-       __u32           len;            /* length (including nulls) of name */
-       char            name[0];        /* stub for possible name */
-};
-
-/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH.  */
-#define IN_ACCESS       0x00000001     /* File was accessed.  */
-#define IN_MODIFY       0x00000002     /* File was modified.  */
-#define IN_ATTRIB       0x00000004     /* Metadata changed.  */
-#define IN_CLOSE_WRITE  0x00000008     /* Writtable file was closed.  */
-#define IN_CLOSE_NOWRITE 0x00000010    /* Unwrittable file closed.  */
-#define IN_CLOSE        (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close.  */
-#define IN_OPEN                 0x00000020     /* File was opened.  */
-#define IN_MOVED_FROM   0x00000040     /* File was moved from X.  */
-#define IN_MOVED_TO      0x00000080    /* File was moved to Y.  */
-#define IN_MOVE                 (IN_MOVED_FROM | IN_MOVED_TO) /* Moves.  */
-#define IN_CREATE       0x00000100     /* Subfile was created.  */
-#define IN_DELETE       0x00000200     /* Subfile was deleted.  */
-#define IN_DELETE_SELF  0x00000400     /* Self was deleted.  */
-#define IN_MOVE_SELF    0x00000800     /* Self was moved.  */
-
-/* Events sent by the kernel.  */
-#define IN_UNMOUNT      0x00002000     /* Backing fs was unmounted.  */
-#define IN_Q_OVERFLOW   0x00004000     /* Event queued overflowed.  */
-#define IN_IGNORED      0x00008000     /* File was ignored.  */
-
-/* Special flags.  */
-#define IN_ISDIR        0x40000000     /* Event occurred against dir.  */
-#define IN_ONESHOT      0x80000000     /* Only send event once.  */
-
-/* All events which a program can wait on.  */
-#define IN_ALL_EVENTS   (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE  \
-                         | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM        \
-                         | IN_MOVED_TO | IN_CREATE | IN_DELETE               \
-                         | IN_DELETE_SELF | IN_MOVE_SELF)
-
-
-#ifdef __KERNEL__
-
-#include <linux/dcache.h>
-#include <linux/fs.h>
-#include <linux/config.h>
-
-#ifdef CONFIG_INOTIFY
-
-extern void inotify_inode_queue_event(struct inode *, __u32, __u32,
-                                     const char *);
-extern void inotify_dentry_parent_queue_event(struct dentry *, __u32, __u32,
-                                             const char *);
-extern void inotify_unmount_inodes(struct list_head *);
-extern void inotify_inode_is_dead(struct inode *);
-extern u32 inotify_get_cookie(void);
-
-#else
-
-static inline void inotify_inode_queue_event(struct inode *inode,
-                                            __u32 mask, __u32 cookie,
-                                            const char *filename)
-{
-}
-
-static inline void inotify_dentry_parent_queue_event(struct dentry *dentry,
-                                                    __u32 mask, __u32 cookie,
-                                                    const char *filename)
-{
-}
-
-static inline void inotify_unmount_inodes(struct list_head *list)
-{
-}
-
-static inline void inotify_inode_is_dead(struct inode *inode)
-{
-}
-
-static inline u32 inotify_get_cookie(void)
-{
-       return 0;
-}
-
-#endif /* CONFIG_INOTIFY */
-
-#endif /* __KERNEL __ */
-
-#endif /* _LINUX_INOTIFY_H */

Removed: apps/gworkspace/trunk/Tools/fswatcher/local_inotify_syscalls.h
URL: 
http://svn.gna.org/viewcvs/gnustep/apps/gworkspace/trunk/Tools/fswatcher/local_inotify_syscalls.h?rev=38544&view=auto
==============================================================================
--- apps/gworkspace/trunk/Tools/fswatcher/local_inotify_syscalls.h      
(original)
+++ apps/gworkspace/trunk/Tools/fswatcher/local_inotify_syscalls.h      
(removed)
@@ -1,85 +0,0 @@
-#ifndef _LINUX_INOTIFY_SYSCALLS_H
-#define _LINUX_INOTIFY_SYSCALLS_H
-
-#include <asm/types.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-
-#if defined(__i386__)
-# define __NR_inotify_init     291
-# define __NR_inotify_add_watch        292
-# define __NR_inotify_rm_watch 293
-#elif defined(__x86_64__)
-# define __NR_inotify_init     253
-# define __NR_inotify_add_watch        254
-# define __NR_inotify_rm_watch 255
-#elif defined(__alpha__)
-# define __NR_inotify_init      444
-# define __NR_inotify_add_watch 445
-# define __NR_inotify_rm_watch  446
-#elif defined(__ppc__) || defined(__powerpc__) || defined(__powerpc64__)
-# define __NR_inotify_init      275
-# define __NR_inotify_add_watch 276
-# define __NR_inotify_rm_watch  277
-#elif defined(__sparc__) || defined (__sparc64__)
-# define __NR_inotify_init      151
-# define __NR_inotify_add_watch 152
-# define __NR_inotify_rm_watch  156
-#elif defined (__ia64__)
-# define __NR_inotify_init  1277
-# define __NR_inotify_add_watch 1278
-# define __NR_inotify_rm_watch  1279
-#elif defined (__s390__) || defined (__s390x__)
-# define __NR_inotify_init  284
-# define __NR_inotify_add_watch 285
-# define __NR_inotify_rm_watch  286
-#elif defined (__arm__)
-# define __NR_inotify_init  316
-# define __NR_inotify_add_watch 317
-# define __NR_inotify_rm_watch  318
-#elif defined (__SH4__)
-# define __NR_inotify_init  290
-# define __NR_inotify_add_watch 291
-# define __NR_inotify_rm_watch  292
-#elif defined (__SH5__)
-# define __NR_inotify_init  318
-# define __NR_inotify_add_watch 319
-# define __NR_inotify_rm_watch  320
-#else
-# warning "Unsupported architecture"
-#endif
-
-#if defined(__i386__) || defined(__x86_64) || defined(__alpha__) || 
defined(__ppc__) || defined(__sparc__) || defined(__powerpc__) || 
defined(__powerpc64__) || defined(__ia64__) || defined(__s390__)
-static inline int inotify_init (void)
-{
-       return syscall (__NR_inotify_init);
-}
-
-static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
-{
-       return syscall (__NR_inotify_add_watch, fd, name, mask);
-}
-
-static inline int inotify_rm_watch (int fd, __u32 wd)
-{
-       return syscall (__NR_inotify_rm_watch, fd, wd);
-}
-#else
-static inline int inotify_init (void)
-{
-       return -1;
-}
-
-static inline int inotify_add_watch (int fd, const char *name, __u32 mask)
-{
-       return -1;
-}
-
-static inline int inotify_rm_watch (int fd, __u32 wd)
-{
-       return -1;
-}
-
-#endif
-
-#endif /* _LINUX_INOTIFY_SYSCALLS_H */


_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs

Reply via email to