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

List:       kde-core-devel
Subject:    PATCH: disable dnotify by default
From:       Malte Starostik <malte () kde ! org>
Date:       2002-03-09 1:43:53
[Download RAW message or body]

Hi,

the attached patch disables Linux dnotify unless explicitly enabled. The 
reason is dnotify's brokenness wrt exiting child processes. Please review.

NOTE: if you write configure tests that rely on _GNU_SOURCE features like this 
one, make sure to compile them as C, not C++. autoconf 2.5 adds
#ifdef _cplusplus
#include <stdlib.h>
#endif
to the very top of confdefs.h, therefore, the #define _GNU_SOURCE 1 later 
won't have any effect when compiled as C++.

Please review,
-- 
Malte Starostik
PGP: 1024D/D2F3C787 [C138 2121 FAF3 410A 1C2A  27CD 5431 7745 D2F3 C787]

["dnotify.diff" (text/x-diff)]

Index: configure.in.in
===================================================================
RCS file: /home/kde/kdelibs/kio/kio/configure.in.in,v
retrieving revision 1.22
diff -u -3 -d -p -r1.22 configure.in.in
--- configure.in.in	2001/12/14 12:18:34	1.22
+++ configure.in.in	2002/03/09 01:41:49
@@ -43,21 +43,25 @@ dnl ------------------------------------
 dnl Try to find if we have Linux Dir Notification
 dnl ------------------------------------------------------------------------
 
+AC_ARG_ENABLE(dnotify, [  --enable-dnotify        enable use of Linux directory notifications],
+[ kde_enable_dnotify=$enableval ], [])dnl
+
 AC_CHECK_GNU_EXTENSIONS
 
-AC_MSG_CHECKING([for Linux Directory Notification])
-AC_CACHE_VAL(kde_cv_have_dnotify,
-[
-kde_cv_have_dnotify=no
-AC_LANG_SAVE
-AC_LANG_CPLUSPLUS
+if test "x$kde_enable_dnotify" = "xyes"; then
+  AC_MSG_CHECKING([for Linux Directory Notification])
+  AC_CACHE_VAL(kde_cv_have_dnotify,
+  [
+  kde_cv_have_dnotify=no
+  AC_LANG_SAVE
+  AC_LANG_C
 
-AC_TRY_COMPILE(
-[
+  AC_TRY_COMPILE(
+  [
 #include <fcntl.h>
 #include <signal.h>
-],
-[
+  ],
+  [
 #ifndef F_NOTIFY
 #error no dir notification
 #endif
@@ -67,14 +71,15 @@ AC_TRY_COMPILE(
     fcntl(fd, F_SETSIG, SIGRTMIN);
     fcntl(fd, F_NOTIFY, DN_DELETE|DN_CREATE|DN_MULTISHOT);
 
-],kde_cv_have_dnotify=yes)
+  ],kde_cv_have_dnotify=yes)
 
-AC_LANG_RESTORE
-])
+  AC_LANG_RESTORE
+  ])
 
-if test "$kde_cv_have_dnotify" = "yes" ; then
-  AC_DEFINE_UNQUOTED(HAVE_DNOTIFY, 1, [Define if your system has Linux Directory Notification])
-  AC_MSG_RESULT(yes)
-else
-  AC_MSG_RESULT(no)
+  if test "$kde_cv_have_dnotify" = "yes" ; then
+    AC_DEFINE_UNQUOTED(HAVE_DNOTIFY, 1, [Define if your system has Linux Directory Notification])
+    AC_MSG_RESULT(yes)
+  else
+    AC_MSG_RESULT(no)
+  fi
 fi


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

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