diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/channel.c ircd-hybrid-6.0/src/channel.c
--- ircd-hybrid-6.0.orig/src/channel.c	Thu Jun 21 17:06:04 2001
+++ ircd-hybrid-6.0/src/channel.c	Thu Jun 21 13:38:56 2001
@@ -772,7 +772,7 @@
       if ((mask & CHFL_BAN) && (lp->value.banptr->ban_forward_chptr))
 	{
 	  bf_name = lp->value.banptr->ban_forward_chptr->chname;
-	  bf_size=1+strlen(bf_name);  // +1 => includes '!'
+	  bf_size=1+strlen(bf_name);  /* +1 => includes '!' */
 	}
       else bf_name=NULL;
 #endif
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/dbuf.c ircd-hybrid-6.0/src/dbuf.c
--- ircd-hybrid-6.0.orig/src/dbuf.c	Thu Jun 21 17:06:04 2001
+++ ircd-hybrid-6.0/src/dbuf.c	Thu Jun 21 13:36:42 2001
@@ -31,7 +31,7 @@
 #include <assert.h>
 #include <stdio.h>
 #include <stdlib.h>
-
+#include <string.h>
 
 /*
  * And this 'DBufBuffer' should never be referenced outside the
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/fileio.c ircd-hybrid-6.0/src/fileio.c
--- ircd-hybrid-6.0.orig/src/fileio.c	Fri Oct  6 04:00:58 2000
+++ ircd-hybrid-6.0/src/fileio.c	Thu Jun 21 13:36:42 2001
@@ -26,6 +26,7 @@
 #include <fcntl.h>  /* O_RDONLY, O_WRONLY, ... */
 #include <unistd.h> /* read, write, open, close */
 #include <assert.h> /* assert */
+#include <string.h>
 
 #define FB_EOF  0x01
 #define FB_FAIL 0x02
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/ircd.c ircd-hybrid-6.0/src/ircd.c
--- ircd-hybrid-6.0.orig/src/ircd.c	Thu Jun 21 17:06:03 2001
+++ ircd-hybrid-6.0/src/ircd.c	Thu Jun 21 13:36:42 2001
@@ -332,13 +332,15 @@
       bootDaemon = 0; 
       break;
     case 'v':
-      printf("ircd %s\n\tzlib %s\n\tircd_dir: %s\n", version,
 #ifndef ZIP_LINKS
+      printf("ircd %s\n\tzlib %s\n\tircd_dir: %s\n", version,
              "not used",
+              ConfigFileEntry.dpath);
 #else
+      printf("ircd %s\n\tzlib %s\n\tircd_dir: %s\n", version,
               zlib_version,
-#endif
               ConfigFileEntry.dpath);
+#endif
       exit(0);
       break;   /* NOT REACHED */
     case 'x':
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/ircd_signal.c ircd-hybrid-6.0/src/ircd_signal.c
--- ircd-hybrid-6.0.orig/src/ircd_signal.c	Thu Jun 21 17:05:58 2001
+++ ircd-hybrid-6.0/src/ircd_signal.c	Thu Jun 21 13:39:06 2001
@@ -26,6 +26,7 @@
 #include "send.h"         /* flush_connections */
 
 #include <signal.h>
+#include <stdlib.h>
 
 /*
  * dummy_handler - don't know if this is really needed but if alarm is still
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_away.c ircd-hybrid-6.0/src/m_away.c
--- ircd-hybrid-6.0.orig/src/m_away.c	Thu Jun 21 17:06:03 2001
+++ ircd-hybrid-6.0/src/m_away.c	Thu Jun 21 13:39:12 2001
@@ -30,6 +30,7 @@
 #include "send.h"
 
 #include <stdlib.h>
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_capab.c ircd-hybrid-6.0/src/m_capab.c
--- ircd-hybrid-6.0.orig/src/m_capab.c	Wed Jul 28 07:57:56 1999
+++ ircd-hybrid-6.0/src/m_capab.c	Thu Jun 21 13:39:21 2001
@@ -28,6 +28,7 @@
 #include "s_serv.h"
 
 #include <assert.h>
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_die.c ircd-hybrid-6.0/src/m_die.c
--- ircd-hybrid-6.0.orig/src/m_die.c	Thu Jun 21 17:06:02 2001
+++ ircd-hybrid-6.0/src/m_die.c	Thu Jun 21 13:40:02 2001
@@ -31,6 +31,8 @@
 #include "s_log.h"
 #include "send.h"
 
+#include <stdlib.h>
+
 /*
  * m_functions execute protocol messages on this server:
  *
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_message.c ircd-hybrid-6.0/src/m_message.c
--- ircd-hybrid-6.0.orig/src/m_message.c	Thu Jun 21 17:06:04 2001
+++ ircd-hybrid-6.0/src/m_message.c	Thu Jun 21 13:40:41 2001
@@ -416,14 +416,14 @@
         if (MyConnect(sptr) && acptr->user)
           {
 #ifdef  NCTCP
-            // NCTCP (umode +C) checks  -- PMA
-            if (parv[2][0] == 1)                  // is CTCP
-              if (!SeesAllConnections(sptr) &&    // exempt from AUSPEX
-                  !SeesAllConnections(acptr))     // exempt to AUSPEX
-                if (DoesNotCTCP(acptr) ||         // block to +N 
-                   (notice && DoesNotCTCP(sptr))) // block replies from +N
-                  return 0;                       // kill it!
-#endif // NCTCP
+            /* NCTCP (umode +C) checks  -- PMA */
+            if (parv[2][0] == 1)                  /* is CTCP */
+              if (!SeesAllConnections(sptr) &&    /* exempt from AUSPEX */
+                  !SeesAllConnections(acptr))     /* exempt to AUSPEX */
+                if (DoesNotCTCP(acptr) ||         /* block to +N */
+		    (notice && DoesNotCTCP(sptr))) /* block replies from +N */
+                  return 0;                       /* kill it! */
+#endif /* NCTCP */
             if (!notice && acptr->user->away)
               sendto_one(sptr, form_str(RPL_AWAY), me.name,
                          parv[0], acptr->name,
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_oper.c ircd-hybrid-6.0/src/m_oper.c
--- ircd-hybrid-6.0.orig/src/m_oper.c	Thu Jun 21 17:06:04 2001
+++ ircd-hybrid-6.0/src/m_oper.c	Thu Jun 21 16:58:04 2001
@@ -37,7 +37,7 @@
 
 #include <fcntl.h>
 #include <unistd.h>
-
+#include <string.h>
 
 /*
  * m_functions execute protocol messages on this server:
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_quit.c ircd-hybrid-6.0/src/m_quit.c
--- ircd-hybrid-6.0.orig/src/m_quit.c	Thu Jun 21 17:06:02 2001
+++ ircd-hybrid-6.0/src/m_quit.c	Thu Jun 21 13:40:59 2001
@@ -30,6 +30,8 @@
 #include "send.h"
 #include "ctype.h"
 
+#include <string.h>
+
 /*
  * m_functions execute protocol messages on this server:
  *
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_setname.c ircd-hybrid-6.0/src/m_setname.c
--- ircd-hybrid-6.0.orig/src/m_setname.c	Thu Jun 21 17:06:03 2001
+++ ircd-hybrid-6.0/src/m_setname.c	Thu Jun 21 13:41:08 2001
@@ -41,6 +41,8 @@
 #include "s_debug.h"
 #include "client.h"
 
+#include <string.h>
+
 extern int valid_hostname(const char* hostname);
 extern int valid_username(const char* username);
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/m_who.c ircd-hybrid-6.0/src/m_who.c
--- ircd-hybrid-6.0.orig/src/m_who.c	Thu Jun 21 17:06:02 2001
+++ ircd-hybrid-6.0/src/m_who.c	Thu Jun 21 13:41:15 2001
@@ -35,6 +35,8 @@
 #include "list.h"
 #include "irc_string.h"
 
+#include <string.h>
+
 /*
  * m_functions execute protocol messages on this server:
  *
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/match.c ircd-hybrid-6.0/src/match.c
--- ircd-hybrid-6.0.orig/src/match.c	Thu Jun 21 17:06:02 2001
+++ ircd-hybrid-6.0/src/match.c	Thu Jun 21 13:41:48 2001
@@ -28,6 +28,7 @@
 #include "irc_string.h"
 #include "config.h"      /* RFC1035_ANAL */
 #include <assert.h>
+#include <string.h>
 
 /*
 **  Compare if a given string (name) matches the given
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/md5crypt.c ircd-hybrid-6.0/src/md5crypt.c
--- ircd-hybrid-6.0.orig/src/md5crypt.c	Thu Jun 21 17:06:03 2001
+++ ircd-hybrid-6.0/src/md5crypt.c	Thu Jun 21 17:02:59 2001
@@ -107,19 +104,19 @@
 	MD5Init(&ctx);
 
 	/* The password first, since that is what is most unknown */
-	MD5Update(&ctx,pw,strlen(pw));
+	MD5Update(&ctx,(const unsigned char*)pw,strlen(pw));
 
 	/* Then our magic string */
-	MD5Update(&ctx,magic,strlen(magic));
+	MD5Update(&ctx,(const unsigned char*)magic,strlen(magic));
 
 	/* Then the raw salt */
-	MD5Update(&ctx,sp,sl);
+	MD5Update(&ctx,(const unsigned char*)sp,sl);
 
 	/* Then just as many characters of the MD5(pw,salt,pw) */
 	MD5Init(&ctx1);
-	MD5Update(&ctx1,pw,strlen(pw));
-	MD5Update(&ctx1,sp,sl);
-	MD5Update(&ctx1,pw,strlen(pw));
+	MD5Update(&ctx1,(const unsigned char*)pw,strlen(pw));
+	MD5Update(&ctx1,(const unsigned char*)sp,sl);
+	MD5Update(&ctx1,(const unsigned char*)pw,strlen(pw));
 	MD5Final(final,&ctx1);
 	for(pl = strlen(pw); pl > 0; pl -= 16)
 		MD5Update(&ctx,final,pl>16 ? 16 : pl);
@@ -132,7 +129,7 @@
 		if(i&1)
 		    MD5Update(&ctx, final+j, 1);
 		else
-		    MD5Update(&ctx, pw+j, 1);
+		    MD5Update(&ctx, (const unsigned char*)pw+j, 1);
 
 	/* Now make the output string */
 	strcpy(passwd,magic);
@@ -149,20 +146,20 @@
 	for(i=0;i<1000;i++) {
 		MD5Init(&ctx1);
 		if(i & 1)
-			MD5Update(&ctx1,pw,strlen(pw));
+			MD5Update(&ctx1,(const unsigned char*)pw,strlen(pw));
 		else
 			MD5Update(&ctx1,final,16);
 
 		if(i % 3)
-			MD5Update(&ctx1,sp,sl);
+			MD5Update(&ctx1,(const unsigned char*)sp,sl);
 
 		if(i % 7)
-			MD5Update(&ctx1,pw,strlen(pw));
+			MD5Update(&ctx1,(const unsigned char*)pw,strlen(pw));
 
 		if(i & 1)
 			MD5Update(&ctx1,final,16);
 		else
-			MD5Update(&ctx1,pw,strlen(pw));
+			MD5Update(&ctx1,(const unsigned char*)pw,strlen(pw));
 		MD5Final(final,&ctx1);
 	}
 
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/packet.c ircd-hybrid-6.0/src/packet.c
--- ircd-hybrid-6.0.orig/src/packet.c	Thu Jun 21 17:06:04 2001
+++ ircd-hybrid-6.0/src/packet.c	Thu Jun 21 13:41:56 2001
@@ -31,6 +31,7 @@
 #include "irc_string.h"
 
 #include <assert.h>
+#include <string.h>
 
 /*
 ** dopacket
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/restart.c ircd-hybrid-6.0/src/restart.c
--- ircd-hybrid-6.0.orig/src/restart.c	Thu Jun 21 17:06:03 2001
+++ ircd-hybrid-6.0/src/restart.c	Thu Jun 21 13:42:02 2001
@@ -13,6 +13,7 @@
 #include "client.h"
 
 #include <unistd.h>
+#include <stdlib.h>
 
 /* external var */
 extern char** myargv;
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/s_cr.c ircd-hybrid-6.0/src/s_cr.c
--- ircd-hybrid-6.0.orig/src/s_cr.c	Thu Jun 21 17:06:03 2001
+++ ircd-hybrid-6.0/src/s_cr.c	Thu Jun 21 17:00:11 2001
@@ -41,7 +41,7 @@
   unsigned char md[16];
   MD5_CTX ctx;
   MD5Init(&ctx);
-  MD5Update(&ctx, src, strlen(src));
+  MD5Update(&ctx, (unsigned char*)src, strlen(src));
   MD5Final(md, &ctx);
   ircsprintf(trg, "%08x", * (unsigned int *) &md[0]);
   ircsprintf(trg + 8, "%08x", * (unsigned int *) &md[4]);
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/s_misc.c ircd-hybrid-6.0/src/s_misc.c
--- ircd-hybrid-6.0.orig/src/s_misc.c	Thu Jun 21 17:06:02 2001
+++ ircd-hybrid-6.0/src/s_misc.c	Thu Jun 21 13:42:45 2001
@@ -185,8 +185,9 @@
       j++;
     }
 
+  j--;
   sendto_one(cptr, ":%s %d %s :%u total server%s",
-             me.name, RPL_STATSDEBUG, name, --j, (j==1)?"":"s");
+             me.name, RPL_STATSDEBUG, name, j, (j==1)?"":"s");
 
   sendto_one(cptr, ":%s %d %s :Sent total : %7.2f %s",
              me.name, RPL_STATSDEBUG, name, _GMKv(sendK), _GMKs(sendK));
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/src/sprintf_irc.c ircd-hybrid-6.0/src/sprintf_irc.c
--- ircd-hybrid-6.0.orig/src/sprintf_irc.c	Sat Jul 31 02:53:32 1999
+++ ircd-hybrid-6.0/src/sprintf_irc.c	Thu Jun 21 13:42:55 2001
@@ -451,7 +451,7 @@
 ircsprintf(register char *str, const char *format, ...)
 
 {
-        register va_list args;
+        va_list args;
         register int bytes;
 
         va_start(args, format);
diff -ruN -x configure -x *~ -x ircd-hybrid-6.0.orig -x *.rej ircd-hybrid-6.0.orig/tools/fixklines.c ircd-hybrid-6.0/tools/fixklines.c
--- ircd-hybrid-6.0.orig/tools/fixklines.c	Wed Aug 11 00:07:25 1999
+++ ircd-hybrid-6.0/tools/fixklines.c	Thu Jun 21 13:43:33 2001
@@ -32,6 +32,7 @@
 #include <sys/types.h>
 #include <sys/time.h>
 #include <ctype.h>
+#include <stdlib.h>
 
 #define MAXLINE 1024
 #define YES 1
