gamin r337 - in trunk: . server
- From: veillard svn gnome org
- To: svn-commits-list gnome org
- Subject: gamin r337 - in trunk: . server
- Date: Mon, 20 Oct 2008 16:07:48 +0000 (UTC)
Author: veillard
Date: Mon Oct 20 16:07:48 2008
New Revision: 337
URL: http://svn.gnome.org/viewvc/gamin?rev=337&view=rev
Log:
* server/local_inotify.h server/local_inotify_syscalls.h: remove
the local copies of the linux kernel inotify headers
* configure.in server/inotify-kernel.c server/inotify-helper.c
server/gam_inotify.c server/inotify-path.c server/Makefile.am:
associated cleanups, check for the presence of sys/inotify.h
and use it, patch by Adrian Bunk, solves #553158
Daniel
Removed:
trunk/server/local_inotify.h
trunk/server/local_inotify_syscalls.h
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/server/Makefile.am
trunk/server/gam_inotify.c
trunk/server/inotify-helper.c
trunk/server/inotify-kernel.c
trunk/server/inotify-path.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Mon Oct 20 16:07:48 2008
@@ -196,31 +196,33 @@
AC_DEFINE(ENABLE_POLLING,1,[Use polling as backend])
backends="polling"
-if test x$os = xlinux-gnu; then
- AC_ARG_ENABLE(inotify,
- AC_HELP_STRING([--disable-inotify], [Disable the INotify backend]),
- [inotify="${enableval}"], [inotify=true])
+AC_ARG_ENABLE(inotify,
+ AC_HELP_STRING([--disable-inotify], [Disable the INotify backend]),
+ [inotify="${enableval}"], [inotify=auto])
+
+if test x$inotify = xyes; then
+ inotify=true
+elif test x$inotify = xno; then
+ inotify=false
+fi
- if test x$inotify = xyes; then
+if test x$inotify = xtrue -o x$inotify = xauto; then
+ AC_CHECK_HEADERS(sys/inotify.h)
+ if test x"$ac_cv_header_sys_inotify_h" = x"no" -a x"$inotify" = xtrue; then
+ AC_MSG_ERROR([sys/inotify.h requested but not available])
+ fi
+ if test x"$ac_cv_header_sys_inotify_h" = xyes; then
+ AC_DEFINE(ENABLE_INOTIFY,1,[Use inotify as backend])
+ backends="${backends}, inotify"
inotify=true
- elif test x$inotify = xno; then
+ else
inotify=false
- elif test x$inotify != xtrue; then
- AC_MSG_ERROR(bad value ${enableval} for --disable-inotify)
fi
fi
dnl check if inotify backend is enabled
AM_CONDITIONAL(ENABLE_INOTIFY, test x$inotify = xtrue)
-if test x$inotify = xtrue; then
- AC_CHECK_HEADERS(linux/types.h)
- AC_CHECK_HEADERS(linux/inotify.h)
- AC_CHECK_HEADERS(sys/inotify.h)
- AC_DEFINE(ENABLE_INOTIFY,1,[Use inotify as backend])
- backends="${backends}, inotify"
-fi
-
if test x$os = xlinux-gnu; then
AC_ARG_ENABLE(dnotify,
AC_HELP_STRING([--disable-dnotify], [Disable the DNotify backend]),
Modified: trunk/server/Makefile.am
==============================================================================
--- trunk/server/Makefile.am (original)
+++ trunk/server/Makefile.am Mon Oct 20 16:07:48 2008
@@ -56,8 +56,7 @@
inotify-missing.c inotify-missing.h \
inotify-path.c inotify-path.h \
inotify-sub.c inotify-sub.h \
- inotify-diag.c inotify-diag.h \
- local_inotify.h local_inotify_syscalls.h
+ inotify-diag.c inotify-diag.h
endif
if ENABLE_DNOTIFY
Modified: trunk/server/gam_inotify.c
==============================================================================
--- trunk/server/gam_inotify.c (original)
+++ trunk/server/gam_inotify.c Mon Oct 20 16:07:48 2008
@@ -18,19 +18,7 @@
#include "server_config.h"
#include <string.h>
-/* Just include the local header to stop all the pain */
-#include "local_inotify.h"
-#if 0
-#ifdef HAVE_SYS_INOTIFY_H
-/* We don't actually include the libc header, because there has been
- * problems with libc versions that was built without inotify support.
- * Instead we use the local version.
- */
-#include "local_inotify.h"
-#elif defined (HAVE_LINUX_INOTIFY_H)
-#include <linux/inotify.h>
-#endif
-#endif
+#include <sys/inotify.h>
#include "inotify-sub.h"
#include "inotify-helper.h"
#include "inotify-diag.h"
Modified: trunk/server/inotify-helper.c
==============================================================================
--- trunk/server/inotify-helper.c (original)
+++ trunk/server/inotify-helper.c Mon Oct 20 16:07:48 2008
@@ -28,19 +28,7 @@
#include <time.h>
#include <string.h>
#include <sys/ioctl.h>
-/* Just include the local header to stop all the pain */
-#include "local_inotify.h"
-#if 0
-#ifdef HAVE_SYS_INOTIFY_H
-/* We don't actually include the libc header, because there has been
- * problems with libc versions that was built without inotify support.
- * Instead we use the local version.
- */
-#include "local_inotify.h"
-#elif defined (HAVE_LINUX_INOTIFY_H)
-#include <linux/inotify.h>
-#endif
-#endif
+#include <sys/inotify.h>
#include "inotify-helper.h"
#include "inotify-missing.h"
#include "inotify-path.h"
Modified: trunk/server/inotify-kernel.c
==============================================================================
--- trunk/server/inotify-kernel.c (original)
+++ trunk/server/inotify-kernel.c Mon Oct 20 16:07:48 2008
@@ -24,22 +24,7 @@
#include <glib.h>
#include "inotify-kernel.h"
-/* Just include the local headers to stop all the pain */
-#include "local_inotify.h"
-#include "local_inotify_syscalls.h"
-#if 0
-#ifdef HAVE_SYS_INOTIFY_H
-/* We don't actually include the libc header, because there has been
- * problems with libc versions that was built without inotify support.
- * Instead we use the local version.
- */
-#include "local_inotify.h"
-#include "local_inotify_syscalls.h"
-#elif defined (HAVE_LINUX_INOTIFY_H)
-#include <linux/inotify.h>
-#include "local_inotify_syscalls.h"
-#endif
-#endif
+#include <sys/inotify.h>
/* Timings for pairing MOVED_TO / MOVED_FROM events */
#define PROCESS_EVENTS_TIME 1000 /* milliseconds (1 hz) */
Modified: trunk/server/inotify-path.c
==============================================================================
--- trunk/server/inotify-path.c (original)
+++ trunk/server/inotify-path.c Mon Oct 20 16:07:48 2008
@@ -25,21 +25,8 @@
#include "config.h"
-/* Don't put conflicting kernel types in the global namespace: */
-#define __KERNEL_STRICT_NAMES
+#include <sys/inotify.h>
-#include "local_inotify.h"
-#if 0
-#ifdef HAVE_SYS_INOTIFY_H
-/* We don't actually include the libc header, because there has been
- * problems with libc versions that was built without inotify support.
- * Instead we use the local version.
- */
-#include "local_inotify.h"
-#elif defined (HAVE_LINUX_INOTIFY_H)
-#include <linux/inotify.h>
-#endif
-#endif
#include <errno.h>
#include <string.h>
#include <glib.h>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]