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

List:       kde-commits
Subject:    branches/KDE/3.5/kdepim/kmail
From:       Dirk Mueller <mueller () kde ! org>
Date:       2008-09-09 9:54:11
Message-ID: 1220954051.138183.22921.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 858979 by mueller:

fix build here too. only hell knows why kmail likes to copy&paste
code from kdelibs that it could just as well just use from kdelibs


 M  +23 -1     configure.in.in  
 M  +5 -1      editorwatcher.cpp  


--- branches/KDE/3.5/kdepim/kmail/configure.in.in #858978:858979
@@ -57,8 +57,30 @@
   AC_LANG_RESTORE
   ])
 
-  if test "$kde_cv_have_inotify" = "yes" ; then
+  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" -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/kdepim/kmail/editorwatcher.cpp #858978:858979
@@ -32,8 +32,12 @@
 #include <cassert>
 
 // inotify stuff taken from kdelibs/kio/kio/kdirwatch.cpp
-#ifdef HAVE_INOTIFY
+#ifdef HAVE_SYS_INOTIFY
 #include <sys/ioctl.h>
+#include <sys/inotify.h>
+#include <fcntl.h>
+#elif HAVE_INOTIFY
+#include <sys/ioctl.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/syscall.h>
[prev in list] [next in list] [prev in thread] [next in thread] 

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