[eggheads-patches] PATCH: tcl-compat-changes.diff

Tothwolf tothwolf at concentric.net
Mon Oct 18 14:18:12 CST 1999


tcl-compat-changes.diff:
  @TCLLIBFN@ missing from Makefile.in
  $(TCLLIBFN) wasn't being passed from Makefile to src/Makefile
  More reliable way of checking Tcl's version
  Fixed another : ? awk bug
  Fixed VARARG* conflicts, renamed to EGG_VARARG*
  Any Tcl version 7.0 or later will work now. [tested]

-Toth
-------------- next part --------------
diff -urNPX ../exclude ../eggdrop1.3.tmp/Makefile.in ./Makefile.in
--- ../eggdrop1.3.tmp/Makefile.in	Mon Oct 18 04:27:39 1999
+++ ./Makefile.in	Mon Oct 18 05:50:38 1999
@@ -52,19 +52,20 @@
 # stuff for Tcl
 XREQ = @TCL_REQS@
 TCLLIB = @TCLLIB@
+TCLLIBFN = @TCLLIBFN@
 
 CFLAGS = @CFLAGS@ -I.. @DEFS@ $(CFLGS)
 @SET_MAKE@
 
 MAKE_STATIC = $(MAKE) 'CC=$(CC)' 'LD=$(LD)' 'STRIP=$(STRIP)' \
-'RANLIB=$(RANLIB)' 'CFLAGS=$(CFLAGS) -DSTATIC' 'CPPFLAGS=$(CPPFLAGS)' \
-'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \
-'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
+'RANLIB=$(RANLIB)' 'CFLAGS=$(CFLAGS) -DSTATIC' \
+'CPPFLAGS=$(CPPFLAGS)' 'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \
+'TCLLIBFN=$(TCLLIBFN)' 'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
 
 MAKE_MODEGG = $(MAKE) 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' 'STRIP=$(MOD_STRIP)' \
-'RANLIB=$(RANLIB)' 'CFLAGS=$(CFLAGS)' 'CPPFLAGS=$(CPPFLAGS)' \
-'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \
-'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
+'RANLIB=$(RANLIB)' 'CFLAGS=$(CFLAGS)' \
+'CPPFLAGS=$(CPPFLAGS)' 'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \
+'TCLLIBFN=$(TCLLIBFN)' 'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
 
 MAKE_MODULES = $(MAKE) 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
 'STRIP=$(SHLIB_STRIP)' 'CFLAGS=$(CFLAGS)' 'CPPFLAGS=$(CPPFLAGS)'
@@ -72,12 +73,12 @@
 MAKE_SDEBUG = $(MAKE) 'CC=$(CC)' 'LD=$(LD)' 'STRIP=touch' \
 'RANLIB=$(RANLIB)' 'CFLAGS=-g3 $(CFLAGS) -DSTATIC -DEBUG_MEM' \
 'CPPFLAGS=$(CPPFLAGS)' 'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \
-'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
+'TCLLIBFN=$(TCLLIBFN)' 'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
 
 MAKE_MEMEGG = $(MAKE) 'CC=$(MOD_CC)' 'LD=$(MOD_LD)' 'STRIP=touch' \
 'RANLIB=$(RANLIB)' 'CFLAGS=-g3 $(CFLAGS) -DEBUG_MEM' \
 'CPPFLAGS=$(CPPFLAGS)' 'EGGEXEC=$(EGGEXEC)' 'TCLLIB=$(TCLLIB)' \
-'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
+'TCLLIBFN=$(TCLLIBFN)' 'XREQ=$(XREQ)' 'XLIBS=@TCL_LIBS@ @LIBS@'
 
 MAKE_DEBMODULES = $(MAKE) 'CC=$(SHLIB_CC)' 'LD=$(SHLIB_LD)' \
 'STRIP=touch' 'CFLAGS=-g3 $(CFLAGS) -DEBUG_MEM' 'CPPFLAGS=$(CPPFLAGS)'
diff -urNPX ../exclude ../eggdrop1.3.tmp/configure ./configure
--- ../eggdrop1.3.tmp/configure	Mon Oct 18 04:28:04 1999
+++ ./configure	Mon Oct 18 05:52:24 1999
@@ -3058,8 +3058,26 @@
   echo "$ac_t""not found" 1>&6
 fi
 
-# done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail
-if test "x${TCLLIBFN}" = "x" || test "x${TCLINCFN}" = "x"
+# done looking, now either TCLLIBFN & TCLINCFN are both set, or we will bail
+if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"
+then
+  # is this really Tcl ?
+  TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
+fi
+
+# check Tcl version
+echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
+echo "configure:3071: checking for Tcl version" >&5
+if test ! "x${TCL_VERSION}" = "x"
+then
+  echo "$ac_t""$TCL_VERSION" 1>&6
+  TCL_FOUND=1
+else
+  echo "$ac_t""not found" 1>&6
+  TCL_FOUND=0
+fi
+
+if test $TCL_FOUND = 0
 then
   cat << 'EOF' >&2
 configure: error:
@@ -3077,120 +3095,108 @@
 
 EOF
   exit 1
-else # TCLLIBFN || TCLINCFN
+else
 
-  # is this really Tcl ?
-  TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | wc -l`
-  if test $TCLFOUND = 1
+  # is this Tcl version too old for us to use ?
+  TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i1 < 7) print "yes"; else print "no"}'`
+  if test "$TCL_VER_PRE70" = "xyes"
   then
+    cat << EOF >&2
+configure: error:
 
-    # check Tcl version
-    echo $ac_n "checking for Tcl version""... $ac_c" 1>&6
-echo "configure:3090: checking for Tcl version" >&5
-    TCLVER=`grep TCL_VERSION $TCLINC/$TCLINCFN | $AWK '{gsub(/\"/, "", $3); print $3}' | head -1`
-    if test ! "x${TCLVER}" = "x"
-    then
-      echo "$ac_t""$TCLVER" 1>&6
-    else
-      echo "$ac_t""hmm... unknown version" 1>&6
-    fi
+  Your Tcl version is much too old for eggdrop to use.
+  I suggest you download and complie a more recent version.
+  The most reliable current version is $tclrecommendver
 
-    # are we using a pre 7.5 Tcl version ?
-    OLD_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] >= 5)) || (i[1] >= 8)) print "no"; else print "yes"}'`
-    if test "x${OLD_TCL}" = "xyes"
-    then
-      cat >> confdefs.h <<\EOF
+EOF
+    exit 1
+  fi
+
+  # are we using a pre 7.5 Tcl version ?
+  TCL_VER_PRE75=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] >= 5)) || (i[1] >= 8)) print "no"; else print "yes"}'`
+  if test "x${TCL_VER_PRE75}" = "xyes"
+  then
+    cat >> confdefs.h <<\EOF
 #define HAVE_OLD_TCL 1
 EOF
 
-    else
-      # detect buggy Tcl 8.1 compiled with threads
-      BUGGY_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
-      if test "x${BUGGY_TCL}" = "xyes"
+  else
+
+    # detect buggy Tcl 8.1 compiled with threads
+    TCL_VER_81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
+    if test "x${TCL_VER_81}" = "xyes"
+    then
+      echo $ac_n "checking for buggy Tcl 8.1 threads""... $ac_c" 1>&6
+echo "configure:3131: checking for buggy Tcl 8.1 threads" >&5
+      if test -f "$TCLLIB/$tclconfigfile"
       then
-	echo $ac_n "checking for buggy Tcl 8.1 threads""... $ac_c" 1>&6
-echo "configure:3113: checking for buggy Tcl 8.1 threads" >&5
-	if test -f "$TCLLIB/$tclconfigfile"
+	TCL_HAS_THREADS=`grep 'TCL_DEFS' $TCLLIB/$tclconfigfile | grep 'TCL_THREADS=1' | wc -l`
+	if test $TCL_HAS_THREADS = 1
 	then
-	  HASTHREADS=`grep 'TCL_DEFS' $TCLLIB/$tclconfigfile | grep 'TCL_THREADS=1' | wc -l`
-	  if test $HASTHREADS = 1
-	  then
-	    echo "$ac_t""yes...using a workaround..." 1>&6
-	    cat >> confdefs.h <<\EOF
+	  echo "$ac_t""yes...using a workaround." 1>&6
+	  cat >> confdefs.h <<\EOF
 #define HAVE_BUGGY_TCL_THREADS 1
 EOF
 
-	  else
-	    echo "$ac_t""no" 1>&6
-	  fi
 	else
-	  echo "$ac_t""${tclconfigfile} is missing...better safe then sorry..." 1>&6
-	  cat >> confdefs.h <<\EOF
+	  echo "$ac_t""no" 1>&6
+	fi
+      else
+	echo "$ac_t""${tclconfigfile} is missing...better to be safe then sorry." 1>&6
+	cat >> confdefs.h <<\EOF
 #define HAVE_BUGGY_TCL_THREADS 1
 EOF
 
-	fi
-      fi # BUGGYTCL
-    fi # OLDTCL
+      fi
+    fi
+  fi
 
-    if test ! "x${TCLLIBEXT}" = "x.a"
-    then
-      TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-      TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
-    else
+  if test ! "x${TCLLIBEXT}" = "x.a"
+  then
+    TCL_REQS="$TCLLIB/lib$TCLLIBFN"
+    TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+  else
 
-      # set default make as static for unshared Tcl library
-      if test ! "$DEFAULT_MAKE" = "static"
-      then
-	cat << 'EOF' >&2
+    # set default make as static for unshared Tcl library
+    if test ! "$DEFAULT_MAKE" = "static"
+    then
+      cat << 'EOF' >&2
 configure: warning:
 
   Your libtcl is not a shared library.
-  configure will set default make type to static...
+  configure will set default make type to static.
 
 EOF
-	DEFAULT_MAKE=static
-      fi
+      DEFAULT_MAKE=static
+    fi
+
+    # are we using a pre 7.4 Tcl version ?
+    TCL_VER_PRE74=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] <= 3)) || (i[1] <= 6)) print "yes"; else print "no"}'`
+    if test "x${TCL_VER_PRE74}" = "xno"
+    then
 
-      # are we using a pre 7.4 Tcl version ?
-      VERYOLDTCL=`echo $TCLVER | $AWK '{split($1, i, "."); print ((i[1] <= 7) && (i[2] <= 3)) ? "yes" : "no"}'`
-      if test "x${VERYOLDTCL}" = "xno"
+      # was the --with-tcllib option given ?
+      if test ! "x${tcllibname}" = "x"
       then
-	# was the --with-tcllib option given ?
-	if test ! "x${tcllibname}" = "x"
-	then
-	  TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-	  TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
-	else
-	  TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-	  TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
-	fi
+	TCL_REQS="$TCLLIB/lib$TCLLIBFN"
+	TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
       else
-	cat << EOF >&2
+	TCL_REQS="$TCLLIB/lib$TCLLIBFN"
+	TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+      fi
+    else
+      cat << EOF >&2
 configure: warning:
 
-  Your Tcl version ($TCLVER) is older then 7.4.
-  There is a known problem, but we will use a workaround.
+  Your Tcl version ($TCL_VERSION) is older then 7.4.
+  There are known problems, but we will work around them.
 
 EOF
-	TCL_REQS="libtcle.a"
-	TCL_LIBS="-L. -ltcle -lm"
-      fi
+      TCL_REQS="libtcle.a"
+      TCL_LIBS="-L. -ltcle -lm"
     fi
-
-  else # TCLFOUND
-    cat << EOF >&2
-configure: error:
-
-  Your Tcl version is much too old for eggdrop to use.
-  I suggest you download and complie a more recent version.
-  The most reliable current version is $tclrecommendver
-
-EOF
-    exit 1
-  fi # TCLFOUND
-
-fi # TCLLIBFN || TCLINCFN
+  fi
+fi
 
 
 
diff -urNPX ../exclude ../eggdrop1.3.tmp/configure.in ./configure.in
--- ../eggdrop1.3.tmp/configure.in	Mon Oct 18 04:28:05 1999
+++ ./configure.in	Mon Oct 18 04:07:43 1999
@@ -651,8 +651,25 @@
   AC_MSG_RESULT(not found)
 fi
 
-# done looking, now either TCLLIBFN & TCLINCFN are both set, or we bail
-if test "x${TCLLIBFN}" = "x" || test "x${TCLINCFN}" = "x"
+# done looking, now either TCLLIBFN & TCLINCFN are both set, or we will bail
+if test ! "x${TCLLIBFN}" = "x" && test ! "x${TCLINCFN}" = "x"
+then
+  # is this really Tcl ?
+  TCL_VERSION=`grep TCL_VERSION $TCLINC/$TCLINCFN | head -1 | $AWK '{gsub(/\"/, "", $3); print $3}'`
+fi
+
+# check Tcl version
+AC_MSG_CHECKING(for Tcl version)
+if test ! "x${TCL_VERSION}" = "x"
+then
+  AC_MSG_RESULT($TCL_VERSION)
+  TCL_FOUND=1
+else
+  AC_MSG_RESULT(not found)
+  TCL_FOUND=0
+fi
+
+if test $TCL_FOUND = 0
 then
   cat << 'EOF' >&2
 configure: error:
@@ -670,115 +687,104 @@
 
 EOF
   exit 1
-else # TCLLIBFN || TCLINCFN
+else
 
-  # is this really Tcl ?
-  TCLFOUND=`grep TCL_VERSION $TCLINC/$TCLINCFN | wc -l`
-  if test $TCLFOUND = 1
+  # is this Tcl version too old for us to use ?
+  TCL_VER_PRE70=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (i[1] < 7) print "yes"; else print "no"}'`
+  if test "$TCL_VER_PRE70" = "xyes"
   then
+    cat << EOF >&2
+configure: error:
 
-    # check Tcl version
-    AC_MSG_CHECKING(for Tcl version)
-    TCLVER=`grep TCL_VERSION $TCLINC/$TCLINCFN | $AWK '{gsub(/\"/, "", $3); print $3}' | head -1`
-    if test ! "x${TCLVER}" = "x"
-    then
-      AC_MSG_RESULT($TCLVER)
-    else
-      AC_MSG_RESULT(hmm... unknown version)
-    fi
+  Your Tcl version is much too old for eggdrop to use.
+  I suggest you download and complie a more recent version.
+  The most reliable current version is $tclrecommendver
 
-    # are we using a pre 7.5 Tcl version ?
+EOF
+    exit 1
+  fi
+
+  # are we using a pre 7.5 Tcl version ?
 changequote(,)dnl
-    OLD_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] >= 5)) || (i[1] >= 8)) print "no"; else print "yes"}'`
+  TCL_VER_PRE75=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] >= 5)) || (i[1] >= 8)) print "no"; else print "yes"}'`
 changequote([, ])dnl
-    if test "x${OLD_TCL}" = "xyes"
-    then
-      AC_DEFINE(HAVE_OLD_TCL)
-    else
-      # detect buggy Tcl 8.1 compiled with threads
+  if test "x${TCL_VER_PRE75}" = "xyes"
+  then
+    AC_DEFINE(HAVE_OLD_TCL)
+  else
+
+    # detect buggy Tcl 8.1 compiled with threads
 changequote(,)dnl
-      BUGGY_TCL=`echo $TCLVER | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
+    TCL_VER_81=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if ((i[1] == 8) && (i[2] == 1)) print "yes"; else print "no"}'`
 changequote([, ])dnl
-      if test "x${BUGGY_TCL}" = "xyes"
+    if test "x${TCL_VER_81}" = "xyes"
+    then
+      AC_MSG_CHECKING(for buggy Tcl 8.1 threads)
+      if test -f "$TCLLIB/$tclconfigfile"
       then
-	AC_MSG_CHECKING(for buggy Tcl 8.1 threads)
-	if test -f "$TCLLIB/$tclconfigfile"
+	TCL_HAS_THREADS=`grep 'TCL_DEFS' $TCLLIB/$tclconfigfile | grep 'TCL_THREADS=1' | wc -l`
+	if test $TCL_HAS_THREADS = 1
 	then
-	  HASTHREADS=`grep 'TCL_DEFS' $TCLLIB/$tclconfigfile | grep 'TCL_THREADS=1' | wc -l`
-	  if test $HASTHREADS = 1
-	  then
-	    AC_MSG_RESULT(yes...using a workaround...)
-	    AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
-	  else
-	    AC_MSG_RESULT(no)
-	  fi
-	else
-	  AC_MSG_RESULT(${tclconfigfile} is missing...better safe then sorry...)
+	  AC_MSG_RESULT(yes...using a workaround.)
 	  AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
+	else
+	  AC_MSG_RESULT(no)
 	fi
-      fi # BUGGYTCL
-    fi # OLDTCL
+      else
+	AC_MSG_RESULT(${tclconfigfile} is missing...better to be safe then sorry.)
+	AC_DEFINE(HAVE_BUGGY_TCL_THREADS)
+      fi
+    fi
+  fi
 
-    if test ! "x${TCLLIBEXT}" = "x.a"
-    then
-      TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-      TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
-    else
+  if test ! "x${TCLLIBEXT}" = "x.a"
+  then
+    TCL_REQS="$TCLLIB/lib$TCLLIBFN"
+    TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+  else
 
-      # set default make as static for unshared Tcl library
-      if test ! "$DEFAULT_MAKE" = "static"
-      then
-	cat << 'EOF' >&2
+    # set default make as static for unshared Tcl library
+    if test ! "$DEFAULT_MAKE" = "static"
+    then
+      cat << 'EOF' >&2
 configure: warning:
 
   Your libtcl is not a shared library.
-  configure will set default make type to static...
+  configure will set default make type to static.
 
 EOF
-	DEFAULT_MAKE=static
-      fi
+      DEFAULT_MAKE=static
+    fi
 
-      # are we using a pre 7.4 Tcl version ?
+    # are we using a pre 7.4 Tcl version ?
 changequote(,)dnl
-      VERYOLDTCL=`echo $TCLVER | $AWK '{split($1, i, "."); print ((i[1] <= 7) && (i[2] <= 3)) ? "yes" : "no"}'`
+    TCL_VER_PRE74=`echo $TCL_VERSION | $AWK '{split($1, i, "."); if (((i[1] == 7) && (i[2] <= 3)) || (i[1] <= 6)) print "yes"; else print "no"}'`
 changequote([, ])dnl
-      if test "x${VERYOLDTCL}" = "xno"
+    if test "x${TCL_VER_PRE74}" = "xno"
+    then
+
+      # was the --with-tcllib option given ?
+      if test ! "x${tcllibname}" = "x"
       then
-	# was the --with-tcllib option given ?
-	if test ! "x${tcllibname}" = "x"
-	then
-	  TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-	  TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
-	else
-	  TCL_REQS="$TCLLIB/lib$TCLLIBFN"
-	  TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
-	fi
+	TCL_REQS="$TCLLIB/lib$TCLLIBFN"
+	TCL_LIBS="$TCLLIB/lib$TCLLIBFN -lm"
       else
-	cat << EOF >&2
+	TCL_REQS="$TCLLIB/lib$TCLLIBFN"
+	TCL_LIBS="-L$TCLLIB -l$TCLLIBFNS -lm"
+      fi
+    else
+      cat << EOF >&2
 configure: warning:
 
-  Your Tcl version ($TCLVER) is older then 7.4.
-  There is a known problem, but we will use a workaround.
+  Your Tcl version ($TCL_VERSION) is older then 7.4.
+  There are known problems, but we will work around them.
 
 EOF
-	TCL_REQS="libtcle.a"
-	TCL_LIBS="-L. -ltcle -lm"
-      fi
+      TCL_REQS="libtcle.a"
+      TCL_LIBS="-L. -ltcle -lm"
     fi
-
-  else # TCLFOUND
-    cat << EOF >&2
-configure: error:
-
-  Your Tcl version is much too old for eggdrop to use.
-  I suggest you download and complie a more recent version.
-  The most reliable current version is $tclrecommendver
-
-EOF
-    exit 1
-  fi # TCLFOUND
-
-fi # TCLLIBFN || TCLINCFN
+  fi
+fi
 
 AC_SUBST(TCLLIB)
 AC_SUBST(TCLLIBFN)
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/botmsg.c ./src/botmsg.c
--- ../eggdrop1.3.tmp/src/botmsg.c	Thu Oct  7 18:12:02 1999
+++ ./src/botmsg.c	Mon Oct 18 01:56:49 1999
@@ -26,14 +26,14 @@
 
 #ifndef NO_OLD_BOTNET
 /* ditto for tandem bots */
-void tandout_but VARARGS_DEF(int, arg1)
+void tandout_but EGG_VARARGS_DEF(int, arg1)
 {
   int i, x, l;
   char *format;
   char s[601];
 
   va_list va;
-  x = VARARGS_START(int, arg1, va);
+  x = EGG_VARARGS_START(int, arg1, va);
   format = va_arg(va, char *);
 
 #ifdef HAVE_VSNPRINTF
@@ -124,13 +124,13 @@
   return buf_base10 + i;
 }
 
-int simple_sprintf VARARGS_DEF(char *,arg1)
+int simple_sprintf EGG_VARARGS_DEF(char *,arg1)
 {
   char *buf, *format, *s;
   int c = 0, i;
 
   va_list va;
-  buf = VARARGS_START(char *, arg1, va);
+  buf = EGG_VARARGS_START(char *, arg1, va);
   format = va_arg(va, char *);
 
   while (*format && (c < 1023)) {
@@ -277,14 +277,14 @@
     tputs(dcc[idx].sock, "po\n", 3);
 }
 
-void botnet_send_priv VARARGS_DEF(int, arg1)
+void botnet_send_priv EGG_VARARGS_DEF(int, arg1)
 {
   int idx, l;
   char *from, *to, *tobot, *format;
   char tbuf[1024];
 
   va_list va;
-  idx = VARARGS_START(int, arg1, va);
+  idx = EGG_VARARGS_START(int, arg1, va);
   from = va_arg(va, char *);
   to = va_arg(va, char *);
   tobot = va_arg(va, char *);
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/dccutil.c ./src/dccutil.c
--- ../eggdrop1.3.tmp/src/dccutil.c	Wed Sep 15 02:18:58 1999
+++ ./src/dccutil.c	Mon Oct 18 01:56:07 1999
@@ -95,13 +95,13 @@
 }
 
 extern void (*qserver) (int, char *, int);
-void dprintf VARARGS_DEF(int, arg1)
+void dprintf EGG_VARARGS_DEF(int, arg1)
 {
   char *format;
   int idx, len;
 
   va_list va;
-  idx = VARARGS_START(int, arg1, va);
+  idx = EGG_VARARGS_START(int, arg1, va);
   format = va_arg(va, char *);
 
 #ifdef HAVE_VSNPRINTF
@@ -148,14 +148,14 @@
   }
 }
 
-void chatout VARARGS_DEF(char *, arg1)
+void chatout EGG_VARARGS_DEF(char *, arg1)
 {
   int i;
   char *format;
   char s[601];
 
   va_list va;
-  format = VARARGS_START(char *, arg1, va);
+  format = EGG_VARARGS_START(char *, arg1, va);
 
 #ifdef HAVE_VSNPRINTF
   if (vsnprintf(s, 511, format, va) < 0)
@@ -171,14 +171,14 @@
 }
 
 /* print to all on this channel but one */
-void chanout_but VARARGS_DEF(int, arg1)
+void chanout_but EGG_VARARGS_DEF(int, arg1)
 {
   int i, x, chan;
   char *format;
   char s[601];
 
   va_list va;
-  x = VARARGS_START(int, arg1, va);
+  x = EGG_VARARGS_START(int, arg1, va);
   chan = va_arg(va, int);
   format = va_arg(va, char *);
 
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/main.h ./src/main.h
--- ../eggdrop1.3.tmp/src/main.h	Sat Oct 16 20:04:07 1999
+++ ./src/main.h	Mon Oct 18 01:54:22 1999
@@ -18,17 +18,14 @@
 #      include <std_args.h>
 #    endif
 #  endif
-#  define VARARGS(type, name) (type name, ...)
-#  define VARARGS_DEF(type, name) (type name, ...)
-#  define VARARGS_START(type, name, list) (va_start(list, name), name)
+#  define EGG_VARARGS(type, name) (type name, ...)
+#  define EGG_VARARGS_DEF(type, name) (type name, ...)
+#  define EGG_VARARGS_START(type, name, list) (va_start(list, name), name)
 #else
 #  include <varargs.h>
-#  ifdef VARARGS
-#    undef VARARGS
-#  endif
-#  define VARARGS(type, name) ()
-#  define VARARGS_DEF(type, name) (va_alist) va_dcl
-#  define VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
+#  define EGG_VARARGS(type, name) ()
+#  define EGG_VARARGS_DEF(type, name) (va_alist) va_dcl
+#  define EGG_VARARGS_START(type, name, list) (va_start(list), va_arg(list,type))
 #endif
 
 #include <stdio.h>
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/misc.c ./src/misc.c
--- ../eggdrop1.3.tmp/src/misc.c	Sun Oct 17 15:40:16 1999
+++ ./src/misc.c	Mon Oct 18 01:56:17 1999
@@ -423,7 +423,7 @@
 
 /* log something */
 /* putlog(level,channel_name,format,...);  */
-void putlog VARARGS_DEF(int, arg1)
+void putlog EGG_VARARGS_DEF(int, arg1)
 {
   int i, type;
   char *format, *chname, s[MAX_LOG_LINE + 1], s1[256], *out;
@@ -432,7 +432,7 @@
   struct tm *T = localtime(&now);
 
   va_list va;
-  type = VARARGS_START(int, arg1, va);
+  type = EGG_VARARGS_START(int, arg1, va);
   chname = va_arg(va, char *);
   format = va_arg(va, char *);
 
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/mod/share.mod/share.c ./src/mod/share.mod/share.c
--- ../eggdrop1.3.tmp/src/mod/share.mod/share.c	Sat Oct  9 14:19:41 1999
+++ ./src/mod/share.mod/share.c	Mon Oct 18 01:58:06 1999
@@ -20,7 +20,7 @@
 static int resync_time = 900;
 static Function *global = NULL, *transfer_funcs = NULL, *channels_funcs = NULL;
 static void start_sending_users(int);
-static void shareout_but VARARGS(struct chanset_t *, arg1);
+static void shareout_but EGG_VARARGS(struct chanset_t *, arg1);
 static int flush_tbuf(char *bot);
 static int can_resync(char *bot);
 static void dump_resync(int idx);
@@ -1107,7 +1107,7 @@
   }
 }
 
-static void shareout_mod VARARGS_DEF(struct chanset_t *, arg1)
+static void shareout_mod EGG_VARARGS_DEF(struct chanset_t *, arg1)
 {
   int i, l;
   char *format;
@@ -1115,7 +1115,7 @@
   struct chanset_t *chan;
 
   va_list va;
-  chan = VARARGS_START(struct chanset_t *, arg1, va);
+  chan = EGG_VARARGS_START(struct chanset_t *, arg1, va);
 
   if (!chan || channel_shared(chan)) {
     format = va_arg(va, char *);
@@ -1143,7 +1143,7 @@
   va_end(va);
 }
 
-static void shareout_but VARARGS_DEF(struct chanset_t *, arg1)
+static void shareout_but EGG_VARARGS_DEF(struct chanset_t *, arg1)
 {
   int i, x, l;
   char *format;
@@ -1151,7 +1151,7 @@
   struct chanset_t *chan;
 
   va_list va;
-  chan = VARARGS_START(struct chanset_t *, arg1, va);
+  chan = EGG_VARARGS_START(struct chanset_t *, arg1, va);
   x = va_arg(va, int);
   format = va_arg(va, char *);
 
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/proto.h ./src/proto.h
--- ../eggdrop1.3.tmp/src/proto.h	Thu Oct  7 18:12:02 1999
+++ ./src/proto.h	Mon Oct 18 01:55:01 1999
@@ -81,8 +81,8 @@
 
 /* botmsg.c */
 int add_note(char *, char *, char *, int, int);
-int simple_sprintf VARARGS(char *, arg1);
-void tandout_but VARARGS(int, arg1);
+int simple_sprintf EGG_VARARGS(char *, arg1);
+void tandout_but EGG_VARARGS(int, arg1);
 char *int_to_base10(int);
 char *unsigned_int_to_base10(unsigned int);
 char *int_to_base64(unsigned int);
@@ -116,11 +116,11 @@
 void failed_link(int);
 
 /* dccutil.c */
-void dprintf VARARGS(int, arg1);
-void chatout VARARGS(char *, arg1);
+void dprintf EGG_VARARGS(int, arg1);
+void chatout EGG_VARARGS(char *, arg1);
 extern void (*shareout) ();
 extern void (*sharein) (int, char *);
-void chanout_but VARARGS(int, arg1);
+void chanout_but EGG_VARARGS(int, arg1);
 void dcc_chatter(int);
 void lostdcc(int);
 void makepass(char *);
@@ -167,7 +167,7 @@
 
 /* misc.c */
 int my_strcpy(char *, char *);
-void putlog VARARGS(int, arg1);
+void putlog EGG_VARARGS(int, arg1);
 void flushlogs();
 void check_logsize();
 void maskhost(char *, char *);
diff -urNPX ../exclude ../eggdrop1.3.tmp/src/tandem.h ./src/tandem.h
--- ../eggdrop1.3.tmp/src/tandem.h	Wed Jun 23 14:51:31 1999
+++ ./src/tandem.h	Mon Oct 18 01:55:19 1999
@@ -48,7 +48,7 @@
 void botnet_send_act(int, char *, char *, int, char *);
 void botnet_send_ping(int);
 void botnet_send_pong(int);
-void botnet_send_priv VARARGS(int, arg1);
+void botnet_send_priv EGG_VARARGS(int, arg1);
 void botnet_send_who(int, char *, char *, int);
 void botnet_send_infoq(int, char *);
 void botnet_send_unlinked(int, char *, char *);


More information about the Patches mailing list