[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdelibs/kio/kio
From:       Dirk Mueller <mueller () kde ! org>
Date:       2008-09-08 20:32:46
Message-ID: 1220905966.741558.1391.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 858854 by mueller:

prefer the glibc header of inotify support over
the linux header, as the latter is broken with newer kernels


 M  +20 -1     configure.in.in  
 M  +4 -2      kdirwatch.cpp  


--- branches/KDE/3.5/kdelibs/kio/kio/configure.in.in #858853:858854
@@ -136,11 +136,30 @@
 
   ],kde_cv_have_inotify=yes,kde_cv_have_inotify=no)
 
+  AC_CACHE_VAL(kde_cv_have_sys_inotify,
+  [
+  kde_cv_have_sys_inotify=no
+  AC_LANG_SAVE
+  AC_LANG_C
+
+  AC_TRY_COMPILE(
+  [
+#include <sys/inotify.h>
+  ],
+  [
+#ifndef IN_ALL_EVENTS
+#error no inotify notification
+#endif
+  ],kde_cv_have_sys_inotify=yes,kde_cv_have_sys_inotify=no)
+
   AC_LANG_RESTORE
   ])
 
-  if test "$kde_cv_have_inotify" = "yes" ; then
+  if test "$kde_cv_have_inotify" = "yes" -o "$kde_cv_have_sys_inotify" = "yes"; then
     AC_DEFINE_UNQUOTED(HAVE_INOTIFY, 1, [Define if your system has Linux Inode Notification])
+    if test "$kde_cv_have_sys_inotify" = "yes"; then
+      AC_DEFINE_UNQUOTED(HAVE_SYS_INOTIFY, 1, [Define if your system has glibc support for inotify])
+    fi
     AC_MSG_RESULT(yes)
   else
     AC_MSG_RESULT(no)
--- branches/KDE/3.5/kdelibs/kio/kio/kdirwatch.cpp #858853:858854
@@ -64,11 +64,13 @@
 // debug
 #include <sys/ioctl.h>
 
-#ifdef HAVE_INOTIFY
+#ifdef HAVE_SYS_INOTIFY
+#include <sys/inotify.h>
+#include <fcntl.h>
+#elif HAVE_INOTIFY
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/syscall.h>
-#include <linux/types.h>
 // Linux kernel headers are documented to not compile
 #define _S390_BITOPS_H
 #include <linux/inotify.h>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic