[cvslog] [CVS] Module eggdrop1.8: Change committed

cvs at eggheads.org cvs at eggheads.org
Thu Oct 14 03:49:57 CST 2010


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.8
Commit time: 2010-10-14 09:49:57 UTC
Committer  : Rumen Stoyanov <pseudo at egg6.net>

Modified files:
     THANKS aclocal.m4 config.h.in configure doc/Changes1.8
     src/eggdrop.h src/patch.h src/mod/dns.mod/configure
     src/mod/dns.mod/configure.ac src/mod/dns.mod/coredns.c

Log message:

Fixed dns.mod on QNX6/Mac OS X/Solaris
Rewrote dns.mod's autoconf checks to detect the resolver library properly on Darwin/Solaris.
Added -lsocket to the list of libraries, searched for res_* functions, in order to support QNX6.

---------------------- diff included ----------------------
Index: eggdrop1.8/THANKS
diff -u eggdrop1.8/THANKS:1.4 eggdrop1.8/THANKS:1.5
--- eggdrop1.8/THANKS:1.4	Mon Oct 11 02:46:09 2010
+++ eggdrop1.8/THANKS	Thu Oct 14 03:49:47 2010
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.4 2010/10/11 08:46:09 pseudo Exp $:
+$Id: THANKS,v 1.5 2010/10/14 09:49:47 pseudo Exp $:
 
 Eggdrop Developers and Contributors
 Last revised: June 16, 2010
@@ -136,6 +136,7 @@
 CHaiNeSS
 chaos
 Charvel
+Chotaire                                       chotaire at chotaire.moc.kw
 Chriphil
                Chris Northwood
                Chucky Burnett
Index: eggdrop1.8/aclocal.m4
diff -u eggdrop1.8/aclocal.m4:1.6 eggdrop1.8/aclocal.m4:1.7
--- eggdrop1.8/aclocal.m4:1.6	Sun Oct 10 15:24:42 2010
+++ eggdrop1.8/aclocal.m4	Thu Oct 14 03:49:47 2010
@@ -16,7 +16,7 @@
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 dnl
-dnl $Id: aclocal.m4,v 1.6 2010/10/10 21:24:42 pseudo Exp $
+dnl $Id: aclocal.m4,v 1.7 2010/10/14 09:49:47 pseudo Exp $
 dnl
 
 
@@ -734,6 +734,7 @@
     ;;
     QNX)
       SHLIB_LD="ld -shared"
+      AC_DEFINE(QNX_HACKS, 1, [Define if running under QNX.])
     ;;
     OSF1)
       case `echo "$egg_cv_var_system_release" | cut -d . -f 1` in
Index: eggdrop1.8/config.h.in
diff -u eggdrop1.8/config.h.in:1.4 eggdrop1.8/config.h.in:1.5
--- eggdrop1.8/config.h.in:1.4	Sun Oct 10 15:24:43 2010
+++ eggdrop1.8/config.h.in	Thu Oct 14 03:49:47 2010
@@ -372,6 +372,9 @@
 /* Define to the version of this package. */
 #undef PACKAGE_VERSION
 
+/* Define if running under QNX. */
+#undef QNX_HACKS
+
 /* Define to the type of arg 1 for `select'. */
 #undef SELECT_TYPE_ARG1
 
Index: eggdrop1.8/configure
diff -u eggdrop1.8/configure:1.7 eggdrop1.8/configure:1.8
--- eggdrop1.8/configure:1.7	Sun Oct 10 15:24:43 2010
+++ eggdrop1.8/configure	Thu Oct 14 03:49:47 2010
@@ -5512,6 +5512,9 @@
     ;;
     QNX)
       SHLIB_LD="ld -shared"
+
+$as_echo "#define QNX_HACKS 1" >>confdefs.h
+
     ;;
     OSF1)
       case `echo "$egg_cv_var_system_release" | cut -d . -f 1` in
Index: eggdrop1.8/doc/Changes1.8
diff -u eggdrop1.8/doc/Changes1.8:1.18 eggdrop1.8/doc/Changes1.8:1.19
--- eggdrop1.8/doc/Changes1.8:1.18	Mon Oct 11 02:46:10 2010
+++ eggdrop1.8/doc/Changes1.8	Thu Oct 14 03:49:47 2010
@@ -1,4 +1,4 @@
-$Id: Changes1.8,v 1.18 2010/10/11 08:46:10 pseudo Exp $
+$Id: Changes1.8,v 1.19 2010/10/14 09:49:47 pseudo Exp $
 
 Eggdrop Changes (since version 1.8.0)
 
@@ -6,6 +6,13 @@
 
 1.8.0 (CVS):
 
+  - Fixed dns.mod on QNX6/Mac OS X/Solaris
+  - Rewrote dns.mod's autoconf checks to detect the resolver library properly
+    on Darwin/Solaris.
+  - Added -lsocket to the list of libraries, searched for res_* functions, in
+    order to support QNX6.
+    Patch by: pseudo
+
   - Altered the permission check on the pls/mns ban/exempt/invite commands
     from USER_MASTER to USER_OP to allow global operators to set global bans.
     Patch by: pjb
Index: eggdrop1.8/src/eggdrop.h
diff -u eggdrop1.8/src/eggdrop.h:1.4 eggdrop1.8/src/eggdrop.h:1.5
--- eggdrop1.8/src/eggdrop.h:1.4	Thu Aug  5 12:20:34 2010
+++ eggdrop1.8/src/eggdrop.h	Thu Oct 14 03:49:47 2010
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.4 2010/08/05 18:20:34 pseudo Exp $
+ * $Id: eggdrop.h,v 1.5 2010/10/14 09:49:47 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -195,7 +195,15 @@
 /* Yikes...who would have thought finding a usable random() would be so much
  * trouble?
  * Note: random(), rand(), and lrand48() are *not* thread safe.
+ *
+ * QNX doesn't include random() and srandom() in libc.so, only in libc.a
+ * So we can only use these functions in static builds on QNX.
  */
+#if defined QNX_HACKS && defined MAKING_MODS
+#  undef HAVE_RANDOM
+#  undef HAVE_SRANDOM
+#endif
+
 #ifdef HAVE_RANDOM
   /* On systems with random(), RANDOM_MAX may or may not be defined.
    *
@@ -244,7 +252,7 @@
 /* Use high-order bits for getting the random integer. With a modern
  * random() implmentation, modulo would probably be sufficient, but on
  * systems lacking random(), it may just be a macro for an older rand()
- * fucntion.
+ * function.
  */
 #define randint(n) (unsigned long) (random() / (RANDOM_MAX + 1.0) * n)
 
Index: eggdrop1.8/src/mod/dns.mod/configure
diff -u eggdrop1.8/src/mod/dns.mod/configure:1.2 eggdrop1.8/src/mod/dns.mod/configure:1.3
--- eggdrop1.8/src/mod/dns.mod/configure:1.2	Tue Jul 27 07:13:20 2010
+++ eggdrop1.8/src/mod/dns.mod/configure	Thu Oct 14 03:49:47 2010
@@ -564,14 +564,6 @@
 LIBOBJS
 RESINCLUDE
 RESLIB
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
 OBJEXT
 EXEEXT
 ac_ct_CC
@@ -1227,10 +1219,6 @@
 _ACEOF
 
   cat <<\_ACEOF
-
-System types:
-  --build=BUILD     configure for building on BUILD [guessed]
-  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
 _ACEOF
 fi
 
@@ -1369,6 +1357,37 @@
 
 } # ac_fn_c_try_compile
 
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
 # ac_fn_c_try_link LINENO
 # -----------------------
 # Try to link conftest.$ac_ext, and return whether this succeeded.
@@ -1414,73 +1433,6 @@
   as_fn_set_status $ac_retval
 
 } # ac_fn_c_try_link
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
-  $as_echo_n "(cached) " >&6
-else
-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
-   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $2 (); below.
-    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
-    <limits.h> exists even on freestanding compilers.  */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $2
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $2 ();
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined __stub_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  eval "$3=yes"
-else
-  eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
-	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-  eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
 cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
@@ -1861,7 +1813,7 @@
 
 
 
-dns_reslib_avail="true"
+dns_reslib_avail="false"
 
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -2655,495 +2607,88 @@
 ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 
-ac_fn_c_check_func "$LINENO" "res_init" "ac_cv_func_res_init"
-if test "x$ac_cv_func_res_init" = x""yes; then :
-
-else
-
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init in -lresolv" >&5
-$as_echo_n "checking for res_init in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H
+#  include <sys/types.h>
 #endif
-char res_init ();
-int
-main ()
-{
-return res_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv_res_init=yes
-else
-  ac_cv_lib_resolv_res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_init" >&5
-$as_echo "$ac_cv_lib_resolv_res_init" >&6; }
-if test "x$ac_cv_lib_resolv_res_init" = x""yes; then :
-
-    RESLIB="-lresolv"
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init in -lbind" >&5
-$as_echo_n "checking for res_init in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_NETINET_IN_H
+#  include <netinet/in.h>   /* inet_ functions / structs */
 #endif
-char res_init ();
-int
-main ()
-{
-return res_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind_res_init=yes
-else
-  ac_cv_lib_bind_res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_init" >&5
-$as_echo "$ac_cv_lib_bind_res_init" >&6; }
-if test "x$ac_cv_lib_bind_res_init" = x""yes; then :
-
-      RESLIB="-lbind"
-
-else
-
-      dns_reslib_avail="false"
-
-fi
-
-
-fi
-
-
-fi
-
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
-
-  ac_fn_c_check_func "$LINENO" "__res_init" "ac_cv_func___res_init"
-if test "x$ac_cv_func___res_init" = x""yes; then :
-
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_init in -lresolv" >&5
-$as_echo_n "checking for __res_init in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_ARPA_NAMESER_H
+#  include <arpa/nameser.h> /* DNS HEADER struct */
 #endif
-char __res_init ();
-int
-main ()
-{
-return __res_init ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv___res_init=yes
-else
-  ac_cv_lib_resolv___res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_init" >&5
-$as_echo "$ac_cv_lib_resolv___res_init" >&6; }
-if test "x$ac_cv_lib_resolv___res_init" = x""yes; then :
-
-      RESLIB="-lresolv"
-
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_init in -lbind" >&5
-$as_echo_n "checking for __res_init in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___res_init+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_NETDB_H
+#  include <netdb.h>
 #endif
-char __res_init ();
-int
-main ()
-{
-return __res_init ();
-  ;
-  return 0;
-}
+"
+eval as_val=\$$as_ac_Header
+   if test "x$as_val" = x""yes; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
 _ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind___res_init=yes
-else
-  ac_cv_lib_bind___res_init=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___res_init" >&5
-$as_echo "$ac_cv_lib_bind___res_init" >&6; }
-if test "x$ac_cv_lib_bind___res_init" = x""yes; then :
-
-        RESLIB="-lbind"
-
-else
-
-        dns_reslib_avail="false"
-
-fi
-
 
 fi
 
+done
 
-fi
-
-fi
-
-ac_fn_c_check_func "$LINENO" "res_mkquery" "ac_cv_func_res_mkquery"
-if test "x$ac_cv_func_res_mkquery" = x""yes; then :
 
-else
 
-  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_mkquery in -lresolv" >&5
-$as_echo_n "checking for res_mkquery in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv_res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+for lib in '' -lresolv -lbind -lsocket
+do
+  LIBS="$lib"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_mkquery ();
-int
-main ()
-{
-return res_mkquery ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv_res_mkquery=yes
-else
-  ac_cv_lib_resolv_res_mkquery=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_mkquery" >&5
-$as_echo "$ac_cv_lib_resolv_res_mkquery" >&6; }
-if test "x$ac_cv_lib_resolv_res_mkquery" = x""yes; then :
-
-    if test "x${RESLIB}" != "x-lresolv"; then
-      RESLIB="${RESLIB} -lresolv"
-    fi
-
-else
+      #ifdef HAVE_SYS_TYPES_H
+      #  include <sys/types.h>
+      #endif
+      #ifdef HAVE_NETINET_IN_H
+      #  include <netinet/in.h>   /* inet_ functions / structs */
+      #endif
+      #ifdef HAVE_ARPA_NAMESER_H
+      #  include <arpa/nameser.h> /* DNS HEADER struct */
+      #endif
+      #ifdef HAVE_NETDB_H
+      #  include <netdb.h>
+      #endif
+      #include <resolv.h>
 
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_mkquery in -lbind" >&5
-$as_echo_n "checking for res_mkquery in -lbind... " >&6; }
-if test "${ac_cv_lib_bind_res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char res_mkquery ();
 int
 main ()
 {
-return res_mkquery ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind_res_mkquery=yes
-else
-  ac_cv_lib_bind_res_mkquery=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind_res_mkquery" >&5
-$as_echo "$ac_cv_lib_bind_res_mkquery" >&6; }
-if test "x$ac_cv_lib_bind_res_mkquery" = x""yes; then :
-
-      if test "x${RESLIB}" != "x-lbind"; then
-        RESLIB="${RESLIB} -lbind"
-      fi
-
-else
-
-      dns_reslib_avail="false"
-
-fi
-
-
-fi
-
 
-fi
-
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
-
-  ac_fn_c_check_func "$LINENO" "__res_mkquery" "ac_cv_func___res_mkquery"
-if test "x$ac_cv_func___res_mkquery" = x""yes; then :
+      res_init();
+      res_mkquery(0, NULL, 0, 0, NULL, 0, NULL, NULL, 0);
+      ;
+      return 0;
 
-else
-
-    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_mkquery in -lresolv" >&5
-$as_echo_n "checking for __res_mkquery in -lresolv... " >&6; }
-if test "${ac_cv_lib_resolv___res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lresolv  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
-
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __res_mkquery ();
-int
-main ()
-{
-return __res_mkquery ();
   ;
   return 0;
 }
+
 _ACEOF
 if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_resolv___res_mkquery=yes
-else
-  ac_cv_lib_resolv___res_mkquery=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
-    conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv___res_mkquery" >&5
-$as_echo "$ac_cv_lib_resolv___res_mkquery" >&6; }
-if test "x$ac_cv_lib_resolv___res_mkquery" = x""yes; then :
-
-      if test "x${RESLIB}" != "x-lresolv"; then
-        RESLIB="${RESLIB} -lresolv"
-      fi
 
-else
-
-      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __res_mkquery in -lbind" >&5
-$as_echo_n "checking for __res_mkquery in -lbind... " >&6; }
-if test "${ac_cv_lib_bind___res_mkquery+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_check_lib_save_LIBS=$LIBS
-LIBS="-lbind  $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h.  */
+    RESLIB="$lib"
+    dns_reslib_avail="true"
+    break
 
-/* Override any GCC internal prototype to avoid an error.
-   Use char because int might match the return type of a GCC
-   builtin and then its argument prototype would still apply.  */
-#ifdef __cplusplus
-extern "C"
-#endif
-char __res_mkquery ();
-int
-main ()
-{
-return __res_mkquery ();
-  ;
-  return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-  ac_cv_lib_bind___res_mkquery=yes
-else
-  ac_cv_lib_bind___res_mkquery=no
 fi
 rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bind___res_mkquery" >&5
-$as_echo "$ac_cv_lib_bind___res_mkquery" >&6; }
-if test "x$ac_cv_lib_bind___res_mkquery" = x""yes; then :
-
-        if test "x${RESLIB}" != "x-lbind"; then
-          RESLIB="${RESLIB} -lbind"
-        fi
-
-else
-
-        dns_reslib_avail="false";
-
-fi
-
-
-fi
-
-
-fi
-
-fi
-
-# Cygwin checks.
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
-$as_echo_n "checking build system type... " >&6; }
-if test "${ac_cv_build+set}" = set; then :
-  $as_echo_n "(cached) " >&6
-else
-  ac_build_alias=$build_alias
-test "x$ac_build_alias" = x &&
-  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
-test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-esac
-build=$ac_cv_build
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_build
-shift
-build_cpu=$1
-build_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-build_os=$*
-IFS=$ac_save_IFS
-case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
-
+done
 
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
-$as_echo_n "checking host system type... " >&6; }
-if test "${ac_cv_host+set}" = set; then :
-  $as_echo_n "(cached) " >&6
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working resolver library" >&5
+$as_echo_n "checking for a working resolver library... " >&6; }
+if test "$dns_reslib_avail" = "true"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($LIBS)" >&5
+$as_echo "yes ($LIBS)" >&6; }
 else
-  if test "x$host_alias" = x; then
-  ac_cv_host=$ac_cv_build
-else
-  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
-    as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-esac
-host=$ac_cv_host
-ac_save_IFS=$IFS; IFS='-'
-set x $ac_cv_host
-shift
-host_cpu=$1
-host_vendor=$2
-shift; shift
-# Remember, the first character of IFS is used to create $*,
-# except with old shells:
-host_os=$*
-IFS=$ac_save_IFS
-case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
-
-
-if test "${dns_reslib_avail}" = "false"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  # Cygwin checks.
   case $host_os in
     *cygwin* )
       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /usr/local/bind/lib/libbind.a" >&5
Index: eggdrop1.8/src/mod/dns.mod/configure.ac
diff -u eggdrop1.8/src/mod/dns.mod/configure.ac:1.2 eggdrop1.8/src/mod/dns.mod/configure.ac:1.3
--- eggdrop1.8/src/mod/dns.mod/configure.ac:1.2	Tue Jul 27 07:05:43 2010
+++ eggdrop1.8/src/mod/dns.mod/configure.ac	Thu Oct 14 03:49:47 2010
@@ -1,6 +1,6 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.2 2010/07/27 13:05:43 pseudo Exp $
+dnl $Id: configure.ac,v 1.3 2010/10/14 09:49:47 pseudo Exp $
 
 AC_PREREQ(2.59)
 
@@ -12,89 +12,48 @@
 AC_CONFIG_AUX_DIR(../../../misc)
 
 AC_COPYRIGHT([Copyright (C) 1999 - 2010 Eggheads Development Team])
-AC_REVISION($Revision: 1.2 $)
+AC_REVISION($Revision: 1.3 $)
 
-dns_reslib_avail="true"
+dns_reslib_avail="false"
 
-AC_CHECK_FUNC(res_init, [],
-[
-  AC_CHECK_LIB(resolv, res_init,
-  [
-    RESLIB="-lresolv"
-  ], [
-    AC_CHECK_LIB(bind, res_init,
-    [
-      RESLIB="-lbind"
-    ], [
-      dns_reslib_avail="false"
-    ])
-  ])
-])
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
+AC_HEADER_RESOLV
 
-  AC_CHECK_FUNC(__res_init, [],
-  [
-    AC_CHECK_LIB(resolv, __res_init,
-    [
-      RESLIB="-lresolv"
+for lib in '' -lresolv -lbind -lsocket
+do
+  LIBS="$lib"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([
+      #ifdef HAVE_SYS_TYPES_H
+      #  include <sys/types.h>
+      #endif
+      #ifdef HAVE_NETINET_IN_H
+      #  include <netinet/in.h>   /* inet_ functions / structs */
+      #endif
+      #ifdef HAVE_ARPA_NAMESER_H
+      #  include <arpa/nameser.h> /* DNS HEADER struct */
+      #endif
+      #ifdef HAVE_NETDB_H
+      #  include <netdb.h>
+      #endif
+      #include <resolv.h>
     ], [
-      AC_CHECK_LIB(bind, __res_init,
-      [
-        RESLIB="-lbind"
-      ], [
-        dns_reslib_avail="false"
-      ])
+      res_init();
+      res_mkquery(0, NULL, 0, 0, NULL, 0, NULL, NULL, 0);
+      ;
+      return 0;
     ])
-  ])
-fi
-
-AC_CHECK_FUNC(res_mkquery, [],
-[
-  AC_CHECK_LIB(resolv, res_mkquery,
-  [
-    if test "x${RESLIB}" != "x-lresolv"; then
-      RESLIB="${RESLIB} -lresolv"
-    fi
   ], [
-    AC_CHECK_LIB(bind, res_mkquery,
-    [
-      if test "x${RESLIB}" != "x-lbind"; then
-        RESLIB="${RESLIB} -lbind"
-      fi
-    ], [
-      dns_reslib_avail="false"
-    ])
-  ])
-])
-
-if test "${dns_reslib_avail}" = "false"; then
-  dns_reslib_avail="true"
-
-  AC_CHECK_FUNC(__res_mkquery, [],
-  [
-    AC_CHECK_LIB(resolv, __res_mkquery,
-    [
-      if test "x${RESLIB}" != "x-lresolv"; then
-        RESLIB="${RESLIB} -lresolv"
-      fi
-    ], [
-      AC_CHECK_LIB(bind, __res_mkquery,
-      [
-        if test "x${RESLIB}" != "x-lbind"; then
-          RESLIB="${RESLIB} -lbind"
-        fi
-      ], [
-        dns_reslib_avail="false";
-      ])
-    ])
+    RESLIB="$lib"
+    dns_reslib_avail="true"
+    break
   ])
-fi
+done
 
-# Cygwin checks.
-AC_CANONICAL_HOST
-if test "${dns_reslib_avail}" = "false"; then
+AC_MSG_CHECKING([for a working resolver library])
+if test "$dns_reslib_avail" = "true"; then
+  AC_MSG_RESULT([yes ($LIBS)])
+else
+  AC_MSG_RESULT(no)
+  # Cygwin checks.
   case $host_os in
     *cygwin* )
       AC_MSG_CHECKING([for /usr/local/bind/lib/libbind.a])
Index: eggdrop1.8/src/mod/dns.mod/coredns.c
diff -u eggdrop1.8/src/mod/dns.mod/coredns.c:1.3 eggdrop1.8/src/mod/dns.mod/coredns.c:1.4
--- eggdrop1.8/src/mod/dns.mod/coredns.c:1.3	Mon Sep 27 13:38:14 2010
+++ eggdrop1.8/src/mod/dns.mod/coredns.c	Thu Oct 14 03:49:47 2010
@@ -6,7 +6,7 @@
  * Modified/written by Fabian Knittel <fknittel at gmx.de>
  * IPv6 support added by pseudo <pseudo at egg6.net>
  *
- * $Id: coredns.c,v 1.3 2010/09/27 19:38:14 pseudo Exp $
+ * $Id: coredns.c,v 1.4 2010/10/14 09:49:47 pseudo Exp $
  */
 /*
  * Portions Copyright (C) 1999 - 2010 Eggheads Development Team
@@ -274,9 +274,9 @@
 
 #ifdef IPV6
 static unsigned long getip6bash(struct in6_addr *ip6) {
-  u_int32_t x;
+  u_32bit_t x;
   egg_memcpy(&x, &ip6->s6_addr, sizeof x);
-  x ^= *(u_int32_t *)&ip6->s6_addr[12];
+  x ^= *(u_32bit_t *)&ip6->s6_addr[12];
   return (unsigned long) BASH_MODULO(x);
 }
 #endif
Index: eggdrop1.8/src/patch.h
diff -u eggdrop1.8/src/patch.h:1.9 eggdrop1.8/src/patch.h:1.10
--- eggdrop1.8/src/patch.h:1.9	Sun Oct 10 12:22:47 2010
+++ eggdrop1.8/src/patch.h	Thu Oct 14 03:49:47 2010
@@ -10,7 +10,7 @@
  * statement, leave the rest of the file alone, this allows better
  * overlapping patches.
  *
- * $Id: patch.h,v 1.9 2010/10/10 18:22:47 pseudo Exp $
+ * $Id: patch.h,v 1.10 2010/10/14 09:49:47 pseudo Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -41,12 +41,12 @@
  *
  *
  */
-patch("1286657566");            /* current unixtime */
+patch("1287049595");            /* current unixtime */
 /*
  *
  *
  */
-patch("tclstatus");
+patch("qnx6darwin");
 /*
  *
  *
----------------------- End of diff -----------------------


More information about the Changes mailing list