[cvslog] (2008-07-10 10:07:04 UTC) Module eggdrop1.6: Change committed!

cvslog cvs at tsss.org
Thu Jul 10 04:07:04 CST 2008


CVSROOT    : /usr/local/cvsroot
Module     : eggdrop1.6
Commit time: 2008-07-10 10:07:04 UTC
Commited by: Tothwolf <tothwolf at techmonkeys.org>

Modified files:
     aclocal.m4 configure configure.ac doc/Changes1.6 src/eggdrop.h
     src/main.c src/proto.h src/mod/module.h
     src/mod/channels.mod/cmdschan.c

Log message:

More minor autoconf changes.

Context and ContextNote should use 'do {} while (0)' instead of '{}'.

Put Context init code into an #ifdef DEBUG_CONTEXT block.

---------------------- diff included ----------------------
Index: eggdrop1.6/aclocal.m4
diff -u eggdrop1.6/aclocal.m4:1.110 eggdrop1.6/aclocal.m4:1.111
--- eggdrop1.6/aclocal.m4:1.110	Thu Jul  3 22:17:25 2008
+++ eggdrop1.6/aclocal.m4	Thu Jul 10 05:06:53 2008
@@ -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.110 2008-07-04 03:17:25 tothwolf Exp $
+dnl $Id: aclocal.m4,v 1.111 2008-07-10 10:06:53 tothwolf Exp $
 dnl
 
 
@@ -187,19 +187,19 @@
 [
   if test "$GCC" = yes && test "$ICC" = no; then
     AC_CACHE_CHECK([whether the compiler understands -pipe], egg_cv_var_ccpipe, [
-        ac_old_CC="$CC"
-        CC="$CC -pipe"
-        AC_COMPILE_IFELSE([[
-          int main ()
-          {
-            return(0);
-          }
-        ]], [
-          egg_cv_var_ccpipe="yes"
-        ], [
-          egg_cv_var_ccpipe="no"
-        ])
-        CC="$ac_old_CC"
+      ac_old_CC="$CC"
+      CC="$CC -pipe"
+      AC_COMPILE_IFELSE([[
+        int main ()
+        {
+          return(0);
+        }
+      ]], [
+        egg_cv_var_ccpipe="yes"
+      ], [
+        egg_cv_var_ccpipe="no"
+      ])
+      CC="$ac_old_CC"
     ])
 
     if test "$egg_cv_var_ccpipe" = yes; then
@@ -219,16 +219,16 @@
     AC_CACHE_CHECK([whether the compiler understands -Wall], egg_cv_var_ccwall, [
       ac_old_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -Wall"
-       AC_COMPILE_IFELSE([[
-         int main ()
-         {
-           return(0);
-         }
-       ]], [
-         egg_cv_var_ccwall="yes"
-       ], [
-         egg_cv_var_ccwall="no"
-       ])
+      AC_COMPILE_IFELSE([[
+        int main ()
+        {
+          return(0);
+        }
+      ]], [
+        egg_cv_var_ccwall="yes"
+      ], [
+        egg_cv_var_ccwall="no"
+      ])
       CFLAGS="$ac_old_CFLAGS"
     ])
 
@@ -1676,7 +1676,7 @@
     if test "$enable_value" != auto; then
       # Make sure an invalid option wasn't passed as --enable-<opt>=foo
       if test "$enable_value" != yes && test "$enable_value" != no; then
-        opt_name=`echo $enable_option | sed s/_/-/g`
+        opt_name=`echo $enable_option | sed 's/_/-/g'`
         eval opt_default=\$default_$enable_option
         AC_MSG_WARN([Invalid option '$enable_value' passed to --enable-${opt_name}, defaulting to '$opt_default'])
         eval enable_$enable_option="auto"
Index: eggdrop1.6/configure
diff -u eggdrop1.6/configure:1.159 eggdrop1.6/configure:1.160
--- eggdrop1.6/configure:1.159	Thu Jul  3 22:25:07 2008
+++ eggdrop1.6/configure	Thu Jul 10 05:06:53 2008
@@ -3746,14 +3746,14 @@
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
 
-        ac_old_CC="$CC"
-        CC="$CC -pipe"
-        cat >conftest.$ac_ext <<_ACEOF
+      ac_old_CC="$CC"
+      CC="$CC -pipe"
+      cat >conftest.$ac_ext <<_ACEOF
 
-          int main ()
-          {
-            return(0);
-          }
+        int main ()
+        {
+          return(0);
+        }
 
 _ACEOF
 rm -f conftest.$ac_objext
@@ -3774,19 +3774,19 @@
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-          egg_cv_var_ccpipe="yes"
+        egg_cv_var_ccpipe="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-          egg_cv_var_ccpipe="no"
+        egg_cv_var_ccpipe="no"
 
 fi
 
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-        CC="$ac_old_CC"
+      CC="$ac_old_CC"
 
 fi
 { echo "$as_me:$LINENO: result: $egg_cv_var_ccpipe" >&5
@@ -3815,12 +3815,12 @@
 
       ac_old_CFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS -Wall"
-       cat >conftest.$ac_ext <<_ACEOF
+      cat >conftest.$ac_ext <<_ACEOF
 
-         int main ()
-         {
-           return(0);
-         }
+        int main ()
+        {
+          return(0);
+        }
 
 _ACEOF
 rm -f conftest.$ac_objext
@@ -3841,14 +3841,14 @@
 	 test ! -s conftest.err
        } && test -s conftest.$ac_objext; then
 
-         egg_cv_var_ccwall="yes"
+        egg_cv_var_ccwall="yes"
 
 else
   echo "$as_me: failed program was:" >&5
 sed 's/^/| /' conftest.$ac_ext >&5
 
 
-         egg_cv_var_ccwall="no"
+        egg_cv_var_ccwall="no"
 
 fi
 
@@ -10923,7 +10923,7 @@
     if test "$enable_value" != auto; then
       # Make sure an invalid option wasn't passed as --enable-<opt>=foo
       if test "$enable_value" != yes && test "$enable_value" != no; then
-        opt_name=`echo $enable_option | sed s/_/-/g`
+        opt_name=`echo $enable_option | sed 's/_/-/g'`
         eval opt_default=\$default_$enable_option
         { echo "$as_me:$LINENO: WARNING: Invalid option '$enable_value' passed to --enable-${opt_name}, defaulting to '$opt_default'" >&5
 echo "$as_me: WARNING: Invalid option '$enable_value' passed to --enable-${opt_name}, defaulting to '$opt_default'" >&2;}
Index: eggdrop1.6/configure.ac
diff -u eggdrop1.6/configure.ac:1.33 eggdrop1.6/configure.ac:1.34
--- eggdrop1.6/configure.ac:1.33	Thu Jul  3 22:17:25 2008
+++ eggdrop1.6/configure.ac	Thu Jul 10 05:06:53 2008
@@ -1,11 +1,11 @@
 dnl configure.ac: this file is processed by autoconf to produce ./configure.
 dnl
-dnl $Id: configure.ac,v 1.33 2008-07-04 03:17:25 tothwolf Exp $
+dnl $Id: configure.ac,v 1.34 2008-07-10 10:06:53 tothwolf Exp $
 
 AC_PREREQ(2.60)
 AC_INIT([Eggdrop],[1.6.20],[bugs at eggheads.org])
 AC_COPYRIGHT([Copyright (C) 1999 - 2008 Eggheads Development Team])
-AC_REVISION($Revision: 1.33 $)
+AC_REVISION($Revision: 1.34 $)
 AC_CONFIG_SRCDIR(src/eggdrop.h)
 AC_CONFIG_AUX_DIR(misc)
 AC_CONFIG_HEADER(config.h)
@@ -181,8 +181,8 @@
 # Debug options
 EGG_DEBUG_ENABLE
 EGG_DEBUG_DEFAULTS
-EGG_DEBUG_OPTIONS 
-EGG_DEBUG_CFLAGS  
+EGG_DEBUG_OPTIONS
+EGG_DEBUG_CFLAGS
 EGG_ENABLE_DEBUG_CONTEXT
 
 
Index: eggdrop1.6/doc/Changes1.6
diff -u eggdrop1.6/doc/Changes1.6:1.3 eggdrop1.6/doc/Changes1.6:1.4
--- eggdrop1.6/doc/Changes1.6:1.3	Thu Jul 10 04:22:04 2008
+++ eggdrop1.6/doc/Changes1.6	Thu Jul 10 05:06:53 2008
@@ -1,4 +1,4 @@
-$Id: Changes1.6,v 1.3 2008-07-10 09:22:04 tothwolf Exp $
+$Id: Changes1.6,v 1.4 2008-07-10 10:06:53 tothwolf Exp $
 
 Eggdrop Changes (since version 1.6.0)
 
@@ -6,6 +6,11 @@
 
 1.6.20 (CVS):
 
+  - More minor autoconf changes.
+  - Context and ContextNote should use 'do {} while (0)' instead of '{}'.
+  - Put Context init code into an #ifdef DEBUG_CONTEXT block.
+    Patch by: Tothwolf
+
   - Updated doc/Versions and added more milestone information.
   - Misc doc updates and fixes.
     Patch by: Tothwolf
Index: eggdrop1.6/src/eggdrop.h
diff -u eggdrop1.6/src/eggdrop.h:1.68 eggdrop1.6/src/eggdrop.h:1.69
--- eggdrop1.6/src/eggdrop.h:1.68	Thu Jul  3 22:17:25 2008
+++ eggdrop1.6/src/eggdrop.h	Thu Jul 10 05:06:53 2008
@@ -4,7 +4,7 @@
  *
  *   IF YOU ALTER THIS FILE, YOU NEED TO RECOMPILE THE BOT.
  *
- * $Id: eggdrop.h,v 1.68 2008-07-04 03:17:25 tothwolf Exp $
+ * $Id: eggdrop.h,v 1.69 2008-07-10 10:06:53 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -230,8 +230,8 @@
 #  define Context           eggContext(__FILE__, __LINE__, NULL)
 #  define ContextNote(note) eggContextNote(__FILE__, __LINE__, NULL, note)
 #else
-#  define Context           {}
-#  define ContextNote(note) {}
+#  define Context           do {} while (0)
+#  define ContextNote(note) do {} while (0)
 #endif
 
 #ifdef DEBUG_ASSERT
@@ -240,8 +240,7 @@
             eggAssert(__FILE__, __LINE__, NULL);                        \
 } while (0)
 #else
-#  define Assert(expr) do {                                             \
-} while (0)
+#  define Assert(expr) do {} while (0)
 #endif
 
 #ifndef COMPILING_MEM
@@ -268,6 +267,7 @@
 /* IP type */
 typedef u_32bit_t IP;
 
+/* Debug logging macros */
 #define debug0(x)             putlog(LOG_DEBUG,"*",x)
 #define debug1(x,a1)          putlog(LOG_DEBUG,"*",x,a1)
 #define debug2(x,a1,a2)       putlog(LOG_DEBUG,"*",x,a1,a2)
@@ -318,8 +318,8 @@
   char nick[NICKLEN];
   char host[UHOSTLEN];
   struct dcc_table *type;
-  time_t timeval;               /* This is used for timeout checking.  */
-  unsigned long status;         /* A LOT of dcc types have status things; makes it more avaliabe. */
+  time_t timeval;               /* This is used for timeout checking. */
+  unsigned long status;         /* A LOT of dcc types have status things; makes it more availabe. */
   union {
     struct chat_info *chat;
     struct file_info *file;
@@ -488,7 +488,7 @@
 #define STAT_LEAF    0x00080    /* this bot is a leaf only               */
 #define STAT_LINKING 0x00100    /* the bot is currently going through
                                  * the linking stage                     */
-#define STAT_AGGRESSIVE   0x200 /* aggressively sharing with this bot    */
+#define STAT_AGGRESSIVE 0x00200 /* aggressively sharing with this bot    */
 
 /* Flags for listening sockets */
 #define LSTN_PUBLIC  0x000001   /* No access restrictions               */
Index: eggdrop1.6/src/main.c
diff -u eggdrop1.6/src/main.c:1.124 eggdrop1.6/src/main.c:1.125
--- eggdrop1.6/src/main.c:1.124	Thu Jul  3 22:17:25 2008
+++ eggdrop1.6/src/main.c	Thu Jul 10 05:06:53 2008
@@ -5,7 +5,7 @@
  *   command line arguments
  *   context and assert debugging
  *
- * $Id: main.c,v 1.124 2008-07-04 03:17:25 tothwolf Exp $
+ * $Id: main.c,v 1.125 2008-07-10 10:06:53 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -222,11 +222,11 @@
     }
 }
 
-static int nested_debug = 0;
-
 #ifndef DEBUG_CONTEXT
 #define write_debug() do {} while (0)
 #else
+static int nested_debug = 0;
+
 static void write_debug()
 {
   int x;
@@ -403,7 +403,8 @@
 }
 
 #ifdef DEBUG_CONTEXT
-/* Context */
+/* Called from the Context macro.
+ */
 void eggContext(const char *file, int line, const char *module)
 {
   char x[31], *p;
@@ -678,7 +679,7 @@
 int init_tcl(int, char **);
 int init_language(int);
 
-void patch(const char *str)
+static void patch(const char *str)
 {
   char *p = strchr(egg_version, '+');
 
@@ -709,6 +710,9 @@
 #ifdef DEBUG
   struct rlimit cdlim;
 #endif
+#ifdef STOP_UAC
+  int nvpair[2];
+#endif
 
 /* Make sure it can write core, if you make debug. Else it's pretty
  * useless (dw)
@@ -723,11 +727,15 @@
   setrlimit(RLIMIT_CORE, &cdlim);
 #endif
 
+#ifdef DEBUG_CONTEXT
   /* Initialise context list */
   for (i = 0; i < 16; i++)
     Context;
+#endif
 
+/* Include patch.h header for patch("...") */
 #include "patch.h"
+
   /* Version info! */
   egg_snprintf(ver, sizeof ver, "eggdrop v%s", egg_version);
   egg_snprintf(version, sizeof version,
@@ -736,14 +744,13 @@
   /* Now add on the patchlevel (for Tcl) */
   sprintf(&egg_version[strlen(egg_version)], " %u", egg_numver);
   strcat(egg_version, egg_xtra);
-#ifdef STOP_UAC
-  {
-    int nvpair[2];
 
-    nvpair[0] = SSIN_UACPROC;
-    nvpair[1] = UAC_NOPRINT;
-    setsysinfo(SSI_NVPAIRS, (char *) nvpair, 1, NULL, 0);
-  }
+/* For OSF/1 */
+#ifdef STOP_UAC
+  /* Don't print "unaligned access fixup" warning to the user */
+  nvpair[0] = SSIN_UACPROC;
+  nvpair[1] = UAC_NOPRINT;
+  setsysinfo(SSI_NVPAIRS, (char *) nvpair, 1, NULL, 0);
 #endif
 
   /* Set up error traps: */
@@ -786,6 +793,7 @@
   if (argc > 1)
     for (i = 1; i < argc; i++)
       do_arg(argv[i]);
+
   printf("\n%s\n", version);
 
   /* Don't allow eggdrop to run as root */
Index: eggdrop1.6/src/mod/channels.mod/cmdschan.c
diff -u eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.75 eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.76
--- eggdrop1.6/src/mod/channels.mod/cmdschan.c:1.75	Sat Feb 16 15:41:07 2008
+++ eggdrop1.6/src/mod/channels.mod/cmdschan.c	Thu Jul 10 05:06:54 2008
@@ -2,7 +2,7 @@
  * cmdschan.c -- part of channels.mod
  *   commands from a user via dcc that cause server interaction
  *
- * $Id: cmdschan.c,v 1.75 2008-02-16 21:41:07 guppy Exp $
+ * $Id: cmdschan.c,v 1.76 2008-07-10 10:06:54 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -1503,8 +1503,7 @@
         if (strncmp(list[0], "need-", 5) || (u->flags & USER_OWNER)) {
           if (!strncmp(list[0], "need-", 5) && !(isowner(dcc[idx].nick)) &&
               must_be_owner) {
-            dprintf(idx, "Due to security concerns, only permanent owners can "
-                    "set these modes.\n");
+            dprintf(idx, "Due to security concerns, only permanent owners can set these modes.\n");
             nfree(buf);
             return;
           }
Index: eggdrop1.6/src/mod/module.h
diff -u eggdrop1.6/src/mod/module.h:1.85 eggdrop1.6/src/mod/module.h:1.86
--- eggdrop1.6/src/mod/module.h:1.85	Sat Feb 16 15:41:06 2008
+++ eggdrop1.6/src/mod/module.h	Thu Jul 10 05:06:54 2008
@@ -1,7 +1,7 @@
 /*
  * module.h
  *
- * $Id: module.h,v 1.85 2008-02-16 21:41:06 guppy Exp $
+ * $Id: module.h,v 1.86 2008-07-10 10:06:54 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -97,7 +97,7 @@
 #ifdef DEBUG_CONTEXT
 #  define Context (global[2](__FILE__, __LINE__, MODULE_NAME))
 #else
-#  define Context {}
+#  define Context do {} while (0)
 #endif
 #define module_rename ((int (*)(char *, char *))global[3])
 /* 4 - 7 */
@@ -389,15 +389,15 @@
 #ifdef DEBUG_CONTEXT
 #  define ContextNote(note) (global[232](__FILE__, __LINE__, MODULE_NAME, note))
 #else
-#  define ContextNote(note)     do {    } while (0)
+#  define ContextNote(note) do {} while (0)
 #endif
 #ifdef DEBUG_ASSERT
-#  define Assert(expr)          do {                                    \
-        if (!(expr))                                                    \
-                (global[233](__FILE__, __LINE__, MODULE_NAME));         \
+#  define Assert(expr) do {                                             \
+          if (!(expr))                                                  \
+            (global[233](__FILE__, __LINE__, MODULE_NAME));             \
 } while (0)
 #else
-#  define Assert(expr)  do {    } while (0)
+#  define Assert(expr) do {} while (0)
 #endif
 #define allocsock ((int(*)(int sock,int options))global[234])
 #define call_hostbyip ((void(*)(IP, char *, int))global[235])
Index: eggdrop1.6/src/proto.h
diff -u eggdrop1.6/src/proto.h:1.72 eggdrop1.6/src/proto.h:1.73
--- eggdrop1.6/src/proto.h:1.72	Sat Feb 16 15:41:04 2008
+++ eggdrop1.6/src/proto.h	Thu Jul 10 05:06:53 2008
@@ -7,7 +7,7 @@
  * because they use structures in those
  * (saves including those .h files EVERY time) - Beldin
  *
- * $Id: proto.h,v 1.72 2008-02-16 21:41:04 guppy Exp $
+ * $Id: proto.h,v 1.73 2008-07-10 10:06:53 tothwolf Exp $
  */
 /*
  * Copyright (C) 1997 Robey Pointer
@@ -176,7 +176,6 @@
 /* main.c */
 void fatal(const char *, int);
 int expected_memory(void);
-void patch(const char *);
 void eggContext(const char *, int, const char *);
 void eggContextNote(const char *, int, const char *, const char *);
 void eggAssert(const char *, int, const char *);
----------------------- End of diff -----------------------



More information about the Changes mailing list