Committer : isomer
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_11_07
Commit time: 2004-03-19 23:17:34 UTC
Modified files:
Tag: u2_10_11_07
ChangeLog config.h.in configure configure.in ircd/engine_epoll.c
Log message:
Author: Entrope <[EMAIL PROTECTED]>
Log message:
* configure.in: Check for missing epoll functions.
* ircd/engine_epoll.c: Use the results.
* config.h.in, configure: Regenerate.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.130.2.2 ircu2.10/ChangeLog:1.290.2.130.2.3
--- ircu2.10/ChangeLog:1.290.2.130.2.2 Sun Mar 7 14:45:38 2004
+++ ircu2.10/ChangeLog Fri Mar 19 15:17:23 2004
@@ -1,3 +1,11 @@
+2004-02-16 Entrope <[EMAIL PROTECTED]>
+
+ * configure.in: Check for missing epoll functions.
+
+ * ircd/engine_epoll.c: Use the results.
+
+ * config.h.in, configure: Regenerate.
+
2004-03-07 Kevin L Mitchell <[EMAIL PROTECTED]>
* ircd/gline.c (gline_stats): gotta have an else here or we end up
Index: ircu2.10/config.h.in
diff -u ircu2.10/config.h.in:1.2.2.2 ircu2.10/config.h.in:1.2.2.2.2.1
--- ircu2.10/config.h.in:1.2.2.2 Sat Jan 10 16:23:31 2004
+++ ircu2.10/config.h.in Fri Mar 19 15:17:24 2004
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: config.h.in,v 1.2.2.2 2004/01/11 00:23:31 isomer Exp $
+ * $Id: config.h.in,v 1.2.2.2.2.1 2004/03/19 23:17:24 isomer Exp $
*/
/* Define if you have the setrlimit function */
@@ -95,6 +95,9 @@
/* Path to data directory */
#undef DPATH
+/* Define to implement epoll system calls */
+#undef EPOLL_NEED_BODY
+
/* Force inlining for a few critical functions */
#undef FORCEINLINE
Index: ircu2.10/configure
diff -u ircu2.10/configure:1.6.2.5 ircu2.10/configure:1.6.2.5.2.1
--- ircu2.10/configure:1.6.2.5 Sat Jan 10 16:23:31 2004
+++ ircu2.10/configure Fri Mar 19 15:17:24 2004
@@ -7545,6 +7545,51 @@
echo "${ECHO_T}$unet_cv_enable_epoll" >&6
if test x"$unet_cv_enable_epoll" != xno; then
+ echo "$as_me:$LINENO: checking whether epoll functions are properly defined" >&5
+echo $ECHO_N "checking whether epoll functions are properly defined... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/epoll.h>
+int
+main ()
+{
+epoll_create(10);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define EPOLL_NEED_BODY
+_ACEOF
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
cat >>confdefs.h <<\_ACEOF
#define USE_EPOLL
Index: ircu2.10/configure.in
diff -u ircu2.10/configure.in:1.4.2.5 ircu2.10/configure.in:1.4.2.5.2.1
--- ircu2.10/configure.in:1.4.2.5 Sat Jan 10 16:23:32 2004
+++ ircu2.10/configure.in Fri Mar 19 15:17:24 2004
@@ -19,7 +19,7 @@
dnl along with this program; if not, write to the Free Software
dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
dnl
-dnl $Id: configure.in,v 1.4.2.5 2004/01/11 00:23:32 isomer Exp $
+dnl $Id: configure.in,v 1.4.2.5.2.1 2004/03/19 23:17:24 isomer Exp $
dnl Make sure we are in the correct directory (someone could have run
dnl 'configure' with a wrong '--srcdir').
@@ -376,7 +376,14 @@
AC_MSG_RESULT([$unet_cv_enable_epoll])
+dnl If we have the header and user has not refused epoll, we still need
+dnl to check whether the functions are properly defined.
if test x"$unet_cv_enable_epoll" != xno; then
+ AC_MSG_CHECKING([whether epoll functions are properly defined])
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <sys/epoll.h>], [epoll_create(10);])],
+ [AC_MSG_RESULT([yes])],
+ [AC_MSG_RESULT([no])
+ AC_DEFINE([EPOLL_NEED_BODY],,[Define to implement epoll system calls])])
AC_DEFINE([USE_EPOLL], , [Define to enable the epoll engine])
ENGINE_C="engine_epoll.c $ENGINE_C"
fi
Index: ircu2.10/ircd/engine_epoll.c
diff -u ircu2.10/ircd/engine_epoll.c:1.1.4.1 ircu2.10/ircd/engine_epoll.c:1.1.4.1.2.1
--- ircu2.10/ircd/engine_epoll.c:1.1.4.1 Sat Jan 10 16:23:32 2004
+++ ircu2.10/ircd/engine_epoll.c Fri Mar 19 15:17:24 2004
@@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: engine_epoll.c,v 1.1.4.1 2004/01/11 00:23:32 isomer Exp $
+ * $Id: engine_epoll.c,v 1.1.4.1.2.1 2004/03/19 23:17:24 isomer Exp $
*/
#include "config.h"
@@ -40,7 +40,7 @@
/* The GNU C library may have a valid header but stub implementations
* of the epoll system calls. If so, provide our own. */
-#if defined(__stub_epoll_create) || defined(__stub___epoll_create)
+#if defined(__stub_epoll_create) || defined(__stub___epoll_create) ||
defined(EPOLL_NEED_BODY)
/* Oh, did we mention that some glibc releases do not even define the
* syscall numbers? */
----------------------- End of diff -----------------------