On Thu, Dec 6, 2012 at 12:48 PM, Gustavo Sverzut Barbieri
<[email protected]> wrote:
> On Thursday, December 6, 2012, Enlightenment SVN wrote:
>
>> Log:
>> inotify: revert : i want to keep autotools **modularized**. Instead, use
>> in Eio what has been detected in Ecore_File.
>
>
> Damn Vincent, why do you do these things when you don't understand?
>
> Really, I'm quite disappointed you still don't get how this should work
> after this merge, yet you are the one doing the merge. Inotify is a
> platform thing and may be used in various modules as already done. There is
> no reason, point, sense or intelligence in doing the way it was!
>
> Apply this commit again and please don't revert things anymore unless you
> clearly understand its purpose.

funny...

>
>
>
>>
>>
>> Author:       caro
>> Date:         2012-12-05 23:23:50 -0800 (Wed, 05 Dec 2012)
>> New Revision: 80298
>> Trac:         http://trac.enlightenment.org/e/changeset/80298
>>
>> Modified:
>>   trunk/efl/configure.ac trunk/efl/m4/eio_check_options.m4
>> trunk/efl/src/Makefile_Eio.am trunk/efl/src/lib/eio/eio_monitor_inotify.c
>>
>> Modified: trunk/efl/configure.ac
>> ===================================================================
>> --- trunk/efl/configure.ac      2012-12-06 03:06:22 UTC (rev 80297)
>> +++ trunk/efl/configure.ac      2012-12-06 07:23:50 UTC (rev 80298)
>> @@ -104,8 +104,6 @@
>>
>>  #### Default values
>>
>> -want_inotify="no"
>> -
>>  requirements_pc_crypto=""
>>  requirements_pc_deps_crypto=""
>>  requirements_libs_crypto=""
>> @@ -279,11 +277,6 @@
>>        MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
>>        MODULE_EXT=".dll"
>>     ;;
>> -   linux*)
>> -      want_inotify="yes"
>> -      MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
>> -      MODULE_EXT=".so"
>> -   ;;
>>     *)
>>        MODULE_ARCH="$host_os-$host_cpu-v_maj.v_min.v_mic"
>>        MODULE_EXT=".so"
>> @@ -481,17 +474,6 @@
>>  unistd.h \
>>  ])
>>
>> -have_inotify="no"
>> -if test "x${want_inotify}" = "xyes" ; then
>> -   AC_CHECK_HEADER([sys/inotify.h],
>> -      [
>> -       AC_DEFINE([HAVE_INOTIFY], [1], [File monitoring with Inotify])
>> -       have_inotify="yes"
>> -      ],
>> -      [have_inotify="no"])
>> -fi
>> -AM_CONDITIONAL([HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
>> -
>>  EFL_CHECK_PATH_MAX
>>
>>
>> @@ -1843,13 +1825,19 @@
>>
>>  # cserve2 only works on Linux so far.
>>
>> -if test "x${efl_func_shm_open}" = "xno" -o "x${have_inotify}" = "xno";
>> then
>> +if test "x${efl_func_shm_open}" = "xno" ; then
>>     want_evas_cserve2="no"
>>  fi
>>
>> -AC_DEFINE_IF([EVAS_CSERVE2],
>> -   [test "x${want_evas_cserve2}" = "xyes"],
>> -   [1], [Shared cache server.])
>> +if test "x${want_evas_cserve2}" = "xyes" ; then
>> +   AC_CHECK_HEADERS([sys/epoll.h sys/inotify.h sys/signalfd.h],
>> +      [],
>> +      [want_evas_cserve2="no"])
>> +fi
>> +
>> +if test "x${want_evas_cserve2}" = "xyes" ; then
>> +  AC_DEFINE([EVAS_CSERVE2], [1], [Shared cache server.])
>> +fi
>>  AM_CONDITIONAL([EVAS_CSERVE2], [test "x${want_evas_cserve2}" = "xyes"])
>>
>>  ### Configuration
>> @@ -2398,6 +2386,18 @@
>>     ],
>>     [want_poll="yes"])
>>
>> +AC_ARG_ENABLE([inotify],
>> +   [AC_HELP_STRING([--disable-inotify],
>> +      [disable inotify in the ecore_file module. @<:@default=enabled@
>> :>@])],
>> +   [
>> +    if test "x${enableval}" = "xyes" ; then
>> +       want_inotify="yes"
>> +    else
>> +       want_inotify="no"
>> +    fi
>> +   ],
>> +   [want_inotify="yes"])
>> +
>>  AC_ARG_ENABLE([atfile-source],
>>     [AC_HELP_STRING([--disable-atfile-source],
>>         [disable use of atfile source functions as openat and mkdirat
>> @<:@default=detect@:>@])],
>> @@ -2458,6 +2458,19 @@
>>
>>  ### Checks for header files
>>
>> +have_inotify="no"
>> +if test "x${want_inotify}" = "xyes" ; then
>> +   AC_CHECK_HEADER([sys/inotify.h],
>> +      [
>> +       AC_DEFINE([HAVE_INOTIFY], [1], [File monitoring with Inotify])
>> +       have_inotify="yes"
>> +      ],
>> +      [have_inotify="no"])
>> +fi
>> +
>> +AC_MSG_CHECKING([whether inotify is to be used for filemonitoring])
>> +AC_MSG_RESULT(${have_inotify})
>> +
>>  ### Checks for types
>>
>>  ### Checks for structures
>> @@ -3959,9 +3972,12 @@
>>  AC_MSG_RESULT([${have_xattr}])
>>
>>  # Check for inotify specificity
>> +have_inotify="no"
>>  have_notify_win32="no"
>> +EIO_CHECK_INOTIFY([have_inotify="yes"], [have_inotify="no"])
>>  EIO_CHECK_NOTIFY_WIN32([have_notify_win32="yes"],
>> [have_notify_win32="no"])
>>
>> +AM_CONDITIONAL([EIO_HAVE_INOTIFY], [test "x${have_inotify}" = "xyes"])
>>  AM_CONDITIONAL([EIO_HAVE_WINCHANGE], [test "x${have_notify_win32}" =
>> "xyes"])
>>
>>  #### End of Eio
>>
>> Modified: trunk/efl/m4/eio_check_options.m4
>> ===================================================================
>> --- trunk/efl/m4/eio_check_options.m4   2012-12-06 03:06:22 UTC (rev 80297)
>> +++ trunk/efl/m4/eio_check_options.m4   2012-12-06 07:23:50 UTC (rev 80298)
>> @@ -1,3 +1,47 @@
>> +dnl use: EIO_CHECK_INOTIFY([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
>> +AC_DEFUN([EIO_CHECK_INOTIFY],
>> +[
>> +_eio_have_inotify="no"
>> +
>> +dnl We need to check if the right inotify version is accessible
>> +
>> +dnl It is hard to find a good test on how to check the correct
>> +dnl inotify version. They changed the headers a lot.
>> +dnl in kernel 2.6.13 __NR_inotify_init was added to the defined syscalls
>> +dnl in asm/unistd.h and IN_MOVE_SELF was added to linux/inotify.h
>> +dnl so with this check you need a very new kernel and kernel-headers!
>> +
>> +if ! test "x${have_windows}" = "xyes" ; then
>> +
>> +   AC_CHECK_LIB([c], [inotify_init],
>> +      [
>> +       AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify ])
>> +       AC_DEFINE([HAVE_SYS_INOTIFY], [1], [ File monitoring with Inotify
>> - sys/inotify.h ])
>> +       _eio_have_inotify="yes"
>> +      ],
>> +      [
>> +       AC_TRY_COMPILE(
>> +          [
>> +#include <asm/unistd.h>
>> +#include <linux/inotify.h>
>> +          ],
>> +          [
>> +int a = __NR_inotify_init; int b = IN_MOVE_SELF;
>> +          ],
>> +          [
>> +           AC_DEFINE([HAVE_INOTIFY], [1], [ File monitoring with Inotify
>> ])
>> +           _eio_have_inotify="yes"
>> +          ],
>> +          [_eio_have_inotify="no"])
>> +      ])
>> +fi
>> +
>> +AC_MSG_CHECKING([whether inotify is to be used for filemonitoring])
>> +AC_MSG_RESULT([${_eio_have_inotify}])
>> +
>> +AS_IF([test "x${_eio_have_inotify}" = "xyes"], [$1], [$2])
>> +])
>> +
>>  dnl use: EIO_CHECK_NOTIFY_WIN32([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
>>  AC_DEFUN([EIO_CHECK_NOTIFY_WIN32],
>>  [
>>
>> Modified: trunk/efl/src/Makefile_Eio.am
>> ===================================================================
>> --- trunk/efl/src/Makefile_Eio.am       2012-12-06 03:06:22 UTC (rev 80297)
>> +++ trunk/efl/src/Makefile_Eio.am       2012-12-06 07:23:50 UTC (rev 80298)
>> @@ -18,7 +18,7 @@
>>  lib/eio/eio_xattr.c \
>>  lib/eio/eio_private.h
>>
>> -if HAVE_INOTIFY
>> +if EIO_HAVE_INOTIFY
>>  lib_eio_libeio_la_SOURCES += lib/eio/eio_monitor_inotify.c
>>  else
>>  if EIO_HAVE_WINCHANGE
>>
>> Modified: trunk/efl/src/lib/eio/eio_monitor_inotify.c
>> ===================================================================
>> --- trunk/efl/src/lib/eio/eio_monitor_inotify.c 2012-12-06 03:06:22 UTC
>> (rev 80297)
>> +++ trunk/efl/src/lib/eio/eio_monitor_inotify.c 2012-12-06 07:23:50 UTC
>> (rev 80298)
>> @@ -20,8 +20,11 @@
>>  #include "eio_private.h"
>>  #include "Eio.h"
>>
>> -#ifdef HAVE_INOTIFY
>> +#ifdef HAVE_SYS_INOTIFY
>>  # include <sys/inotify.h>
>> +#else
>> +# include <asm/unistd.h>
>> +# include <linux/inotify.h>
>>  #endif
>>
>>
>>  
>> /*============================================================================*
>> @@ -67,6 +70,26 @@
>>    EIO_INOTIFY_LINE(IN_UNMOUNT, SELF_DELETED, SELF_DELETED)
>>  };
>>
>> +#ifndef HAVE_SYS_INOTIFY
>> +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);
>> +}
>> +#endif
>> +
>>  static void
>>  _eio_inotify_del(void *data)
>>  {
>>
>>
>>
>> ------------------------------------------------------------------------------
>> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
>> Remotely access PCs and mobile devices and provide instant support
>> Improve your efficiency, and focus on delivering more value-add services
>> Discover what IT Professionals Know. Rescue delivers
>> http://p.sf.net/sfu/logmein_12329d2d
>> _______________________________________________
>> enlightenment-svn mailing list
>> [email protected] <javascript:;>
>> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>>
>
>
> --
> Gustavo Sverzut Barbieri
> http://profusion.mobi embedded systems
> --------------------------------------
> MSN: [email protected]
> Skype: gsbarbieri
> Mobile: +55 (19) 9225-2202
> ------------------------------------------------------------------------------
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> _______________________________________________
> enlightenment-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to