Committer : entrope
CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Commit time: 2005-01-25 01:37:12 UTC
Modified files:
ChangeLog configure configure.in ircd/ircd_res.c
Log message:
Fail earlier if no lex or yacc is found; fix resolver DNS bug.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.540 ircu2.10/ChangeLog:1.541
--- ircu2.10/ChangeLog:1.540 Sun Jan 23 08:03:13 2005
+++ ircu2.10/ChangeLog Mon Jan 24 17:36:14 2005
@@ -1,3 +1,13 @@
+2005-01-24 Michael Poole <[EMAIL PROTECTED]>
+
+ * configure.in: Make sure that $LEX and $YACC are reasonable and
+ actually run.
+
+ * configure: Regenerate.
+
+ * ircd/ircd_res.c (check_resolver_timeout): Use correct macro to
+ test whether the timer is already pending.
+
2005-01-23 Michael Poole <[EMAIL PROTECTED]>
* doc/example.conf (Kill): Fix typo in realname Kill block
Index: ircu2.10/configure
diff -u ircu2.10/configure:1.25 ircu2.10/configure:1.26
--- ircu2.10/configure:1.25 Tue Dec 28 13:12:06 2004
+++ ircu2.10/configure Mon Jan 24 17:36:23 2005
@@ -8786,22 +8786,22 @@
fi
fi
-if test -x "$LEX"
-then
+if "$LEX" eq ":" ; then
+ { { echo "$as_me:$LINENO: error: Cannot find flex." >&5
+echo "$as_me: error: Cannot find flex." >&2;}
+ { (exit 1); exit 1; }; }
+elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
{ { echo "$as_me:$LINENO: error: Cannot find flex." >&5
echo "$as_me: error: Cannot find flex." >&2;}
{ (exit 1); exit 1; }; }
fi
-if test -z "$LEXLIB"
-then
- { { echo "$as_me:$LINENO: error:
- Cannot find a library with yywrap() in, but flex was found.
+if test -z "$LEXLIB" ; then
+ { { echo "$as_me:$LINENO: error: Cannot find a library with yywrap() in, but
flex was found.
It's possible the compiler you're using ($CC) is incompatible with the
installed library.
See \`config.log' for more details." >&5
-echo "$as_me: error:
- Cannot find a library with yywrap() in, but flex was found.
+echo "$as_me: error: Cannot find a library with yywrap() in, but flex was
found.
It's possible the compiler you're using ($CC) is incompatible with the
installed library.
See \`config.log' for more details." >&2;}
@@ -8851,8 +8851,11 @@
done
test -n "$YACC" || YACC="yacc"
-if test -z "$YACC"
-then
+if "$YACC" eq ":" ; then
+ { { echo "$as_me:$LINENO: error: Cannot find yacc." >&5
+echo "$as_me: error: Cannot find yacc." >&2;}
+ { (exit 1); exit 1; }; }
+elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
{ { echo "$as_me:$LINENO: error: Cannot find yacc." >&5
echo "$as_me: error: Cannot find yacc." >&2;}
{ (exit 1); exit 1; }; }
Index: ircu2.10/configure.in
diff -u ircu2.10/configure.in:1.24 ircu2.10/configure.in:1.25
--- ircu2.10/configure.in:1.24 Tue Dec 28 13:12:03 2004
+++ ircu2.10/configure.in Mon Jan 24 17:37:00 2005
@@ -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.24 2004/12/28 21:12:03 entrope Exp $
+dnl $Id: configure.in,v 1.25 2005/01/25 01:37:00 entrope Exp $
dnl Make sure we are in the correct directory (someone could have run
dnl 'configure' with a wrong '--srcdir').
@@ -142,16 +142,16 @@
dnl (F)LEX - needed for the new conf file parser
AC_PROG_LEX
-if test -x "$LEX"
-then
+dnl The autoconf docs say $LEX defaults to 'lex'. They lie.
+if [ "$LEX" eq ":" ] ; then
+ AC_MSG_ERROR([Cannot find flex.])
+elif echo "" | $LEX -V -v --version > /dev/null 2>&1 ; then
AC_MSG_ERROR([Cannot find flex.])
fi
-if test -z "$LEXLIB"
-then
- AC_MSG_FAILURE([
- Cannot find a library with yywrap() in, but flex was found.
- It's possible the compiler you're using ($CC) is incompatible with the
+if test -z "$LEXLIB" ; then
+ AC_MSG_FAILURE([Cannot find a library with yywrap() in, but flex was found.
+ It's possible the compiler you're using ($CC) is incompatible with the
installed library.])
fi
@@ -159,8 +159,11 @@
dnl YACC - ditto
AC_PROG_YACC
-if test -z "$YACC"
-then
+dnl The autoconf docs say $YACC defaults to 'yacc'. This seems to be true,
+dnl but judging from AC_PROG_LEX, it may not stay true.
+if [ "$YACC" eq ":" ] ; then
+ AC_MSG_ERROR([Cannot find yacc.])
+elif echo "" | $YACC -V -v --version > /dev/null 2>&1 ; then
AC_MSG_ERROR([Cannot find yacc.])
fi
Index: ircu2.10/ircd/ircd_res.c
diff -u ircu2.10/ircd/ircd_res.c:1.14 ircu2.10/ircd/ircd_res.c:1.15
--- ircu2.10/ircd/ircd_res.c:1.14 Tue Dec 28 19:08:09 2004
+++ ircu2.10/ircd/ircd_res.c Mon Jan 24 17:37:01 2005
@@ -18,7 +18,7 @@
*/
/** @file
* @brief IRC resolver functions.
- * @version $Id: ircd_res.c,v 1.14 2004/12/29 03:08:09 entrope Exp $
+ * @version $Id: ircd_res.c,v 1.15 2005/01/25 01:37:01 entrope Exp $
*/
#include "client.h"
@@ -278,7 +278,7 @@
{
if (when > CurrentTime + AR_TTL)
when = CurrentTime + AR_TTL;
- if (!t_active(&res_timeout))
+ if (!t_onqueue(&res_timeout))
timer_add(&res_timeout, timeout_resolver, NULL, TT_ABSOLUTE, when);
else if (when < t_expire(&res_timeout))
timer_chg(&res_timeout, TT_ABSOLUTE, when);
----------------------- End of diff -----------------------