Author: Kev <klmitch@mit.edu>
authorKevin L. Mitchell <klmitch@mit.edu>
Sat, 21 Apr 2001 21:49:14 +0000 (21:49 +0000)
committerKevin L. Mitchell <klmitch@mit.edu>
Sat, 21 Apr 2001 21:49:14 +0000 (21:49 +0000)
Log message:

Some small, misc. changes, along with the first step in redesigning the
configuration system.  runmalloc.[ch] finally retired, msgq_integrity()
retired, and C++-style // comments replaced with C-style /* */ comments,
since, unfortunately, all the world's not gcc.  Almost all .c files contain
an include for config.h first thing, now, and all of the includes in .h
files for config.h have been removed, since they are now redundant.

As I say, this is only the first step toward redesigning the configuration
system; make config shouldn't be necessary anymore since most of the
plethora of compile-time options have been made run-time configurable.
This change includes those changes that must be made to the .c files, and
there shouldn't be any other change that will affect them, except possibly
some macro changes in configure.in.  The end goal is to get rid of the
config subdirectory completely, and arrange things so that the remaining
compile-time options--things like DEBUGMODE and CONFIG_NDEBUG--can be
given on the ./configure command line.  Changes will also include a way to
cache those results.

Testing: Server has been compiled and run with no obvious ill effects as a
result of the changes.

git-svn-id: file:///home/klmitch/undernet-ircu/undernet-ircu-svn/ircu2/trunk@429 c9e4aea6-c8fd-4c43-8297-357d70d61c8c

142 files changed:
ChangeLog
include/channel.h
include/client.h
include/gline.h
include/ircd.h
include/ircd_snprintf.h
include/ircd_string.h
include/jupe.h
include/runmalloc.h [deleted file]
include/s_auth.h
include/s_bsd.h
include/s_debug.h
include/support.h
include/supported.h
include/sys.h
include/whocmds.h
ircd/IPcheck.c
ircd/channel.c
ircd/class.c
ircd/client.c
ircd/crule.c
ircd/dbuf.c
ircd/fda.c
ircd/fileio.c
ircd/gline.c
ircd/hash.c
ircd/ircd.c
ircd/ircd_alloc.c
ircd/ircd_features.c
ircd/ircd_log.c
ircd/ircd_relay.c
ircd/ircd_reply.c
ircd/ircd_signal.c
ircd/ircd_snprintf.c
ircd/ircd_string.c
ircd/ircd_xopen.c
ircd/jupe.c
ircd/list.c
ircd/listener.c
ircd/m_admin.c
ircd/m_away.c
ircd/m_burst.c
ircd/m_clearmode.c
ircd/m_close.c
ircd/m_connect.c
ircd/m_cprivmsg.c
ircd/m_create.c
ircd/m_defaults.c
ircd/m_destruct.c
ircd/m_desynch.c
ircd/m_die.c
ircd/m_endburst.c
ircd/m_error.c
ircd/m_get.c
ircd/m_gline.c
ircd/m_help.c
ircd/m_info.c
ircd/m_invite.c
ircd/m_ison.c
ircd/m_join.c
ircd/m_jupe.c
ircd/m_kick.c
ircd/m_kill.c
ircd/m_links.c
ircd/m_list.c
ircd/m_lusers.c
ircd/m_map.c
ircd/m_mode.c
ircd/m_motd.c
ircd/m_names.c
ircd/m_nick.c
ircd/m_notice.c
ircd/m_oper.c
ircd/m_opmode.c
ircd/m_part.c
ircd/m_pass.c
ircd/m_ping.c
ircd/m_pong.c
ircd/m_privmsg.c
ircd/m_privs.c
ircd/m_proto.c
ircd/m_quit.c
ircd/m_rehash.c
ircd/m_reset.c
ircd/m_restart.c
ircd/m_rping.c
ircd/m_rpong.c
ircd/m_server.c
ircd/m_set.c
ircd/m_settime.c
ircd/m_silence.c
ircd/m_squit.c
ircd/m_stats.c
ircd/m_time.c
ircd/m_tmpl.c
ircd/m_topic.c
ircd/m_trace.c
ircd/m_uping.c
ircd/m_user.c
ircd/m_userhost.c
ircd/m_userip.c
ircd/m_version.c
ircd/m_wallchops.c
ircd/m_wallops.c
ircd/m_wallusers.c
ircd/m_who.c
ircd/m_whois.c
ircd/m_whowas.c
ircd/match.c
ircd/motd.c
ircd/msgq.c
ircd/numnicks.c
ircd/opercmds.c
ircd/os_bsd.c
ircd/os_generic.c
ircd/os_linux.c
ircd/os_openbsd.c
ircd/os_solaris.c
ircd/packet.c
ircd/parse.c
ircd/querycmds.c
ircd/random.c
ircd/res.c
ircd/runmalloc.c [deleted file]
ircd/s_auth.c
ircd/s_bsd.c
ircd/s_conf.c
ircd/s_debug.c
ircd/s_err.c
ircd/s_misc.c
ircd/s_numeric.c
ircd/s_serv.c
ircd/s_stats.c
ircd/s_user.c
ircd/send.c
ircd/sprintf_irc.c
ircd/support.c
ircd/table_gen.c
ircd/uping.c
ircd/userload.c
ircd/whocmds.c
ircd/whowas.c

index 3cc1fa864d93cd160bc98411d8b019f67cbd1dbe..0f8a10d3d33585e8867bac64f7ce1845bd523f5a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+2001-04-21  Kevin L. Mitchell  <klmitch@mit.edu>
+
+       * ircd/msgq.c: finally remove the msgq_integrity() hack, as it's
+       turned up no more bugs
+
+       * ircd/ircd.c: use /* */ comments instead of // comments--all the
+       world's not gcc :(
+
+       * ircd/s_conf.c (conf_add_server): use /* */ comments instead of
+       // comments--all the world's not gcc :(
+
+       * ircd/runmalloc.c: finally garbage-collect unused file
+
+       * include/runmalloc.h: finally garbage-collect unused file
+
+       * ircd/<multiple files>: addition of '#include "config.h"' before
+       all other includes in most .c files
+
+       * include/<multiple files>: remove includes of config.h, which are
+       now going into the raw .c files
+
 2001-04-20  Kevin L. Mitchell  <klmitch@mit.edu>
 
        * ircd/m_whois.c (do_whois): display proper server name if the
index a8c4c3c4fb4401b9c10ab17709ae2744f88152ef..75037c57790f5e7dcb00159332eec955c1f79066 100644 (file)
@@ -21,9 +21,6 @@
  */
 #ifndef INCLUDED_channel_h
 #define INCLUDED_channel_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_ircd_defs_h
 #include "ircd_defs.h"        /* NICKLEN */
 #endif
index 22125edef74c56a621ea33263ca5d938e2913c78..61a57d2cfc48b8424af8f8876fde9031c311427c 100644 (file)
@@ -25,9 +25,6 @@
 #ifndef INCLUDED_ircd_defs_h
 #include "ircd_defs.h"
 #endif
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_dbuf_h
 #include "dbuf.h"
 #endif
index d0dc65aaf9c53603f1b5c03e9e71d7063ffe51ed..cc4e815dedee078e4d44e1b1128211233b414124 100644 (file)
@@ -22,9 +22,6 @@
  *
  * $Id$
  */
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_sys_types_h
 #include <sys/types.h>
 #define INCLUDED_sys_types_h
index f2900e77458dc41f9ac084b9b476fb9db830a312..df1a3980272fce4e7e329ebcdd17f22f92c26030 100644 (file)
@@ -5,9 +5,6 @@
  */
 #ifndef INCLUDED_ircd_h
 #define INCLUDED_ircd_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_struct_h
 #include "struct.h"           /* struct Client */
 #endif
index 5fa984e7d77e2c3eb4500e9216bbb3fde1e65961..ba7277c45a50e34871709bcbe06b844ee318f32e 100644 (file)
@@ -20,9 +20,6 @@
  *
  * $Id$
  */
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_sys_types_h
 #include <sys/types.h>
 #define INCLUDED_sys_types_h
index 778a0287b96766fc881618acd6f25dec80cce117..d7b97c6fa1df5ec768373f7b9534147e53451aaa 100644 (file)
@@ -5,9 +5,6 @@
  */
 #ifndef INCLUDED_ircd_string_h
 #define INCLUDED_ircd_string_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_ircd_chattr_h
 #include "ircd_chattr.h"
 #endif
index f5efe9deebd2fbc9ea7baef1f4e4fe080a6cb87b..e59788d5dcd0b7c8bfc89678f2a8cff1375d4d59 100644 (file)
@@ -22,9 +22,6 @@
  *
  * $Id$
  */
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_sys_types_h
 #include <sys/types.h>
 #define INCLUDED_sys_types_h
diff --git a/include/runmalloc.h b/include/runmalloc.h
deleted file mode 100644 (file)
index 3d9820d..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * runmalloc.h
- *
- * (C) Copyright 1996 - 1997, Carlo Wood (carlo@runaway.xs4all.nl)
- *
- * Headerfile of runmalloc.c
- *
- * $Id$
- */
-#ifndef INCLUDED_runmalloc_h
-#define INCLUDED_runmalloc_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
-#ifndef INCLUDED_sys_types_h
-#include <sys/types.h>         /* size_t */
-#define INCLUDED_sys_types_h
-#endif
-
-typedef void (*OutOfMemoryHandler)(void);
-
-extern void set_nomem_handler(OutOfMemoryHandler handler);
-
-#if 0
-/* 
- * we want to be able to test in DEBUGMODE without turning
- * DEBUGMALLOC on, change in the config not in the code
- */
-#if defined(DEBUGMODE) && !defined(DEBUGMALLOC)
-#define DEBUGMALLOC
-#endif
-#endif
-
-#ifdef DEBUGMALLOC
-
-#if defined(MEMMAGICNUMS) && !defined(MEMSIZESTATS)
-#define MEMSIZESTATS
-#endif
-
-#ifndef MEMLEAKSTATS
-#undef MEMTIMESTATS
-#endif
-
-/*
- * Proto types
- */
-
-#ifdef MEMLEAKSTATS
-extern void *RunMalloc_memleak(size_t size, int line, const char *filename);
-extern void *RunCalloc_memleak(size_t nmemb, size_t size,
-    int line, const char *filename);
-extern void *RunRealloc_memleak(void *ptr, size_t size,
-    int line, const char *filename);
-struct Client;
-extern void report_memleak_stats(struct Client *sptr, int parc, char *parv[]);
-#define MyMalloc(x) RunMalloc_memleak(x, __LINE__, __FILE__)
-#define MyCalloc(x,y) RunCalloc_memleak(x,y, __LINE__, __FILE__)
-#define MyRealloc(x,y) RunRealloc_memleak(x,y, __LINE__, __FILE__)
-
-#else /* !MEMLEAKSTATS */
-extern void *MyMalloc(size_t size);
-extern void *MyCalloc(size_t nmemb, size_t size);
-extern void *MyRealloc(void *ptr, size_t size);
-#endif /* MEMLEAKSTATS */
-
-extern int MyFree_test(void *ptr);
-extern void MyFree(void *ptr);
-
-#ifdef MEMSIZESTATS
-extern unsigned int get_alloc_cnt(void);
-extern size_t get_mem_size(void);
-#endif
-
-#else /* !DEBUGMALLOC */
-
-#ifndef INCLUDED_stdlib_h
-#include <stdlib.h>
-#define INCLUDED_stdlib_h
-#endif
-
-#undef MEMSIZESTATS
-#undef MEMMAGICNUMS
-#undef MEMLEAKSTATS
-#undef MEMTIMESTATS
-
-#define MyFree(x) do { free((x)); (x) = 0; } while(0)
-#define Debug_malloc(x)
-extern void* MyMalloc(size_t size);
-extern void* MyCalloc(size_t nelem, size_t size);
-extern void* MyRealloc(void* x, size_t size);
-
-#endif /* DEBUGMALLOC */
-
-#endif /* INCLUDED_runmalloc_h */
index 30feea0ac8a10ae8a6dac31954ed75f701656833..0b03355e93d13d82f978c5a3ec631e4028e917c6 100644 (file)
@@ -23,9 +23,6 @@
 #include <sys/types.h>
 #define INCLUDED_sys_types_h
 #endif
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 
 struct Client;
 
index b9a88564dbb59b1000f26aa8fe2cd8fa333a5792..a0248c102d64095c32539d052250e66ce862d684 100644 (file)
@@ -5,9 +5,6 @@
  */
 #ifndef INCLUDED_s_bsd_h
 #define INCLUDED_s_bsd_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_sys_types_h
 #include <sys/types.h>         /* size_t, time_t */
 #define INCLUDED_sys_types_h
index a707a718ca218d931405df0483e1bcf972d4b40f..f3bbfd7852543e5bd6a19f4bb9506294c95f0daa 100644 (file)
@@ -5,9 +5,6 @@
  */
 #ifndef INCLUDED_s_debug_h
 #define INCLUDED_s_debug_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 #ifndef INCLUDED_ircd_defs_h
 #include "ircd_defs.h"       /* Needed for HOSTLEN */
 #endif
index 09ce20d638c5ed395a42dcbb1ae3623cd25a6137..a580989e21c7bc3f5f512cbff6bb92d07ed3cf50 100644 (file)
@@ -5,10 +5,6 @@
  */
 #ifndef INCLUDED_support_h
 #define INCLUDED_support_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#define INCLUDED_config_h
-#endif
 #if 0
 #ifndef INCLUDED_sys_types_h
 #include <sys/types.h>         /* broken BSD system headers */
index 4f73a0468d0717b9a39559334a920fc54707ec50..5fbde13b91798a538612e48a8cd2428a4cf55099 100644 (file)
@@ -25,7 +25,6 @@
 #ifndef INCLUDED_supported_h
 #define INCLUDED_supported_h
 
-#include "config.h"
 #include "channel.h"
 #include "ircd_defs.h"
 
index 11d23a3cdc58d5067d4308e838b83019854fc249..e35bc97419380eab4cba526baff60dadab439348 100644 (file)
@@ -20,9 +20,6 @@
  */
 #ifndef INCLUDED_sys_h
 #define INCLUDED_sys_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 
 #if WORDS_BIGENDIAN
 # define BIT_ZERO_ON_LEFT
index 247f6c5a027e39ff6f1226f2d5102c81f244fc3a..44110f7c00b3d858d27d45374be0c097f98e9bf9 100644 (file)
@@ -5,9 +5,6 @@
  */
 #ifndef INCLUDED_whocmds_h
 #define INCLUDED_whocmds_h
-#ifndef INCLUDED_config_h
-#include "config.h"
-#endif
 
 struct Client;
 struct Channel;
index 0fc2cac65d1bf073c243f930167869604ddeffcb..3d850d8f82e24070eae64fa39bcbf42893e63630 100644 (file)
@@ -22,6 +22,8 @@
  * This file should be edited in a window with a width of 141 characters
  * ick
  */
+#include "config.h"
+
 #include "IPcheck.h"
 #include "client.h"
 #include "ircd.h"
index b478373574412e02e14028c2c4357b5e045a0542..bd13efe77be1e6ae0327ff17fe8e7bd58539f5cb 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "channel.h"
 #include "client.h"
 #include "hash.h"
index 2a4d9cbde53f0f673b6153d965d434704418a4ae..f3772478347dddfa6893f8adc48240d257a08561 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "class.h"
 #include "client.h"
 #include "ircd.h"
index 23a03b86301e5b572d6fcbae962f669a4ce1c791..a7aaa2352c234eda174c1c5684cf7579ac8081d0 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "client.h"
 #include "class.h"
 #include "ircd.h"
index 460710779afbd47acaeed5d0cb2c1885b99983aa..5fd660dba3d7b95bd2fadf636e6b57ff977abcc7 100644 (file)
@@ -32,6 +32,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "crule.h"
 #ifndef CR_DEBUG
 
index d8c00a6489a06b17a5a2502af33b0417342a7625..f856132b20a60b125cc6705ceded82f77d369b2f 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "dbuf.h"
 #include "ircd_alloc.h"
 #include "ircd_chattr.h"
index 6349384d8ae2391aec101c7178c81a73b9dd2714..6355a97e5cf45171c409173117564113d6171f96 100644 (file)
@@ -19,6 +19,8 @@
 /*
  * NOTE: Do not include fda.h here
  */
+#include "config.h"
+
 #include <assert.h>
 #include <stdlib.h>
 #include <string.h>
index e79936a15588a4e04663fa1348315106faaeebdb..f6ba89d05c6510bf6bed48a84c32ce2fcc2de42c 100644 (file)
@@ -18,6 +18,8 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
+#include "config.h"
+
 #include "fileio.h"
 #include "ircd_alloc.h"         /* MyMalloc, MyFree */
 
index 0627377c75ab785e9239e300237966e8334e5668..7f0186ff9c5cd53b38664bc725ce66b945b5b0b6 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "gline.h"
 #include "client.h"
 #include "ircd.h"
index 8061a4522948868117289aa9a3b2b617132953fa..5414af42481ca33bea390bc5de8721f527b10862 100644 (file)
@@ -21,6 +21,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "hash.h"
 #include "client.h"
 #include "channel.h"
index a8f088c9f57223963a5b6ed8b927ee80bbe22f36..97ff9f1f8f11c41b93e320e4cab8229b40bde258 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "ircd.h"
 #include "IPcheck.h"
 #include "class.h"
@@ -84,21 +86,22 @@ enum {
 /*----------------------------------------------------------------------------
  * Global data (YUCK!)
  *--------------------------------------------------------------------------*/
-struct Client  me;                      // That's me
-struct Connection me_con;              // That's me too
-struct Client *GlobalClientList  = &me; // Pointer to beginning of Client list
-time_t         TSoffset          = 0;   // Offset of timestamps to system clock
-int            GlobalRehashFlag  = 0;   // do a rehash if set
-int            GlobalRestartFlag = 0;   // do a restart if set
-time_t         CurrentTime;             // Updated every time we leave select()
-
-char          *configfile        = CPATH; // Server configuration file
-int            debuglevel        = -1;    // Server debug level 
-char          *debugmode         = "";    // Server debug level
+struct Client  me;                      /* That's me */
+struct Connection me_con;              /* That's me too */
+struct Client *GlobalClientList  = &me; /* Pointer to beginning of
+                                          Client list */
+time_t         TSoffset          = 0;/* Offset of timestamps to system clock */
+int            GlobalRehashFlag  = 0;   /* do a rehash if set */
+int            GlobalRestartFlag = 0;   /* do a restart if set */
+time_t         CurrentTime;          /* Updated every time we leave select() */
+
+char          *configfile        = CPATH; /* Server configuration file */
+int            debuglevel        = -1;    /* Server debug level  */
+char          *debugmode         = "";    /* Server debug level */
 static char   *dpath             = DPATH;
 
-time_t         nextconnect       = 1; // time for next try_connections call
-time_t         nextping          = 1; // same as above for check_pings()
+time_t         nextconnect       = 1; /* time for next try_connections call */
+time_t         nextping          = 1; /* same as above for check_pings() */
 
 static struct Daemon thisServer  = { 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0 };
 
index ced748d4f24d6001239fcf5ca3452d2e681701ac..17c6571aab62694983ce09645bdbd9f506147953 100644 (file)
@@ -21,6 +21,8 @@
  *
  *   $Id$
  */
+#include "config.h"
+
 #include "ircd_alloc.h"
 #include "ircd_string.h"
 #include "s_debug.h"
index b6a4d0a235c40b541528b6b3afe1d33268967f72..05ed003dff79a68803e7afede5647e68bccad31f 100644 (file)
@@ -19,6 +19,7 @@
  * $Id$
  */
 #include "config.h"
+
 #include "ircd_features.h"
 #include "channel.h"   /* list_set_default */
 #include "class.h"
index 53e8e00ff05b7242d0e71ee7c6d3b2daf30b74ad..52d459e96a4621e946cdcff5a29d67a3a904029e 100644 (file)
  *
  *   $Id$
  */
+#include "config.h"
+
 #include "ircd_log.h"
 #include "client.h"
-#include "config.h"
 #include "ircd_alloc.h"
 #include "ircd_reply.h"
 #include "ircd_snprintf.h"
index f0992194f8bd5eb70e99c83c5bd8c4aa7a96bd45..3eebe2cf9e3178d43c4d58b5a3e99d75de3b8d0b 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "ircd_relay.h"
 #include "channel.h"
 #include "client.h"
index 39d651459d14f66db927fc590afab098b307c5cd..0a25fe54e6e1e2d7022cf95185f0af133e14c3c0 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "ircd_reply.h"
 #include "client.h"
 #include "ircd.h"
index 2ee429b8aaf2659d81cddbcad2e8e234c71ece67..00e09f500522defe43f60b0d2968e3373ab8af15 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "ircd_signal.h"
 #include "ircd.h"
 
index 7a85d6bb770388921e98691be8b743fe95043f13..8706e8069311dc8b9a48fa03b7f811677a546e56 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "client.h"
 #include "channel.h"
 #include "ircd_snprintf.h"
index 113f59d8f001e61bd08d9c635c1a832c4a4c55c1..359d36edd0e4624367c71ff5b6dfe4d9dd78319e 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "ircd_string.h"
 #include "ircd_defs.h"
 #include "ircd_chattr.h"
index 8eccda750aa0f3f74e4ddbca725212a2286c8e46..d4ce70cc89012527e50b3b7a776cdd31a9300f92 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #define _XOPEN_SOURCE
 #define _XOPEN_VERSION 4
 #include "ircd_xopen.h"
index 8c0ecef622596e2512919fa81f0a9ed4437d9047..2a58812a07a1de13e8875dea9da73c59a990baf9 100644 (file)
@@ -20,6 +20,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "jupe.h"
 #include "client.h"
 #include "hash.h"
index 601d5bff2ee1635a2b02e00017d39055c2a333ef..581a3ce8091760edba4313c687d7721427b76c47 100644 (file)
@@ -19,8 +19,9 @@
  *
  * $Id$
  */
-#include "list.h"
+#include "config.h"
 
+#include "list.h"
 #include "client.h"
 #include "ircd.h"
 #include "ircd_alloc.h"
index 921678eabcf86b4cde40f47c58b96fe010794d01..75f4add370c757eb8a75e911200ff976a9751cf0 100644 (file)
@@ -18,6 +18,8 @@
  *
  *  $Id$
  */
+#include "config.h"
+
 #include "listener.h"
 #include "client.h"
 #include "ircd.h"
index d7d3a8b596149afd7cf1010ae145e27c1a8ad2db..2ecd08f2b665f7d7e22c8cf736c1cfc3ac7eac3c 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 79127a30c8b9fba17d69fb975ca2759e8f9f73bd..ebd3cf76a64f47dfd52ec4c8db54a5d0644a5cb6 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index f9a59693bbc5d84dff111355c89ac1be866cbdef..e91484e9222ca5726dc2007dff1f0a08a6b2d52a 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index b64dd001bc2381f575081dcc2397895a55582a80..d71708e45a362d661c7082d3a02fdf45a23ae240 100644 (file)
@@ -80,6 +80,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 5337639fa86063fddcc5718944b9ed4a43e34597..9f8717797a7644e878e0bca311a0c85d8c75d37f 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 43d704ab24fe574fad0075df04f6b97c31ad080f..5e372d42ec9d1ebfabdb0f2df28ec4cd37fcb39f 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 19b986faad3abd9b3d849f6a37fa81a3d296aa5e..9c81c4a08f4519fa4144f51aa434f950272bc827 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index f413c29ba4881f867f0fea770b9cb813a1207cb4..26a4b9c9dc3c6b3968e7683df8d1b5bb7e5dd1b7 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 06f6baacb35945742f0edf7b2b1758124ba5dccf..bb52d2ac0b9fa0ea02fe35ac1e68f5d27694f334 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index c05e41e2eee3ce79a68bd23ecc7491d125cd8028..299abc39ba5aaf1e084fb5c515f415faaed0ce33 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a0e99d047ab6afaaf192ccae2a278cc9c28329fa..2e41c523e52ebd8b6438339805e237a88f16a23c 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index fbc1c427829665adbe2dc1306499b59cdb5f3f6f..f99aa7d3c15994bc51544e2ec86739ae7d7cbd06 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 9243d30bf4d41ae7b9e06433626abe18b12d9c2f..d2236b054a50f3fd1b0388cee007e4cb93cf586a 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 907f31e7fadcf8120c680bb7b4e8a83270590fde..c335485b0b2b8477cff4f3469a722cb833082093 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 3cdd6dbb12c0b9c01d3c2f9f484dc8f892d0d459..e136577213539b81cf8669e891c652dd21fce79e 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index cc87f3ceb17ee5b4687635f4d38d984a6721e5cf..e1aa27dc0f4bf6f91c8fb1490092b4f705bf3a20 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a56341fe8a150c8eafe171e903be72f44a187664..3e63723fa8c6320cbf8735b112e8f0712b3b77e4 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 6c08e84f861e119d1ab6e8597eaecd25ea35de01..e98639c47eb218e06c53c1246199068f130fc410 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 69505520fd9a0c1b037e0443080af32c5b5f3b08..43ef8f5d84cdfa3e71e0ce5353748b5a6953d4b7 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 7f68d285787b75dba92def535bca38e03f27f0b4..9968a4440b78be4fb6218c555c71f0265950b7df 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index f07d1f1fe493f3bb627daab0b764321d55998fa2..82f36551aeb520aac16535eba643df8cadc983b3 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 3926f32eaeb3ac92ee2e728a80c5a08ef39078bd..f49cb61391ce21606b3f1ae3a32a3789590b28aa 100644 (file)
@@ -80,6 +80,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 6252247e3217db49270f8873873a51242858c44f..86e7af844898cca6e156a30a54a438bff2affd3d 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 52c64a4195712e4dce2c8f6ebdcd2d696de37026..730d54029aa255339075e090f0ff81594a907b36 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 38d5abddcaadbc6ebb898e050a1c89bd3aced9f3..7f1f98e3ec5606866051a6686b12d0e4955693f8 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 0270d00f1637913ff603176ac139a6eb2b38e440..eaf970757c686cfb7519c4c072f1a771a01e06fe 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 313492ca332198c5be651c740a832b76eee2ff49..764252d4fd54e645aa722eb56a4ed3ab73d03b51 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 8346b4eab424df79b51105ecb4accedc6e88c257..74ed166af5306053add9bffc2fbbd325b2b24419 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 74792320bcf3d8e73e92ec7cdf2c0bdaf96e2748..f2b2f00554367953290b3de7fd54edf561cc5c70 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #include "handlers.h"
 #include "channel.h"
 #include "client.h"
index ba16ad602d4f0a5dd61ed98e5ae36dc47ed38902..f75cadfbb8b7730489e09520682fe637c420bb9e 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index f36a7672c39793cf14a8f1645d71763f4a69efef..1ccb30489a66e6b7565c19592840cb0c651d7b80 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 3f3770839db1893cbc999852344dcbc93fe0cfca..f532a89397e68ed4ced64c965932c60184c8b1fe 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index caff3d0757cce13532aedc8dedc8eefa57e8ad38..f7de7c390ab44fe532e74d0cc31545858f9de2c9 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 5bbf215bda1e3e78fd0c8375175171bfdc383d19..47cb0b0f130ac4cd1d4086a53d04e2b543c92635 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index af9b03f5e12dd2c0ace4a895a497961767dd9f85..f0f1eec96c8ad1fc653a57caf640b54f676affde 100644 (file)
@@ -80,6 +80,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 19ea1f02532f3e5fd8f1ab9d72e95100520c0b80..86d772d04a99472e30af58d2b5c5bcd6a3616b73 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 5dee35bcf129bcb43e261630d503a8b57685991d..4629f691c6497ec0eee20d62b01f4884a52b0793 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 60e223218e61dd140610ab54ebc5ad3806eab69b..d882ce7f66c8924230e1ab97e874a541a728beb1 100644 (file)
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a6b9967445021b8b956ede392faaf77c94fc6663..a746ca8abb1375c385733d0043008df3062363a1 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 2aa19b86fdf787ce8925e86c1b7d0a0d1e3229ea..fc351e7b2fa82210428fc3c3196511e1adb27ed3 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a5a307d2b3b94be1877fdaad8f438750e7a77758..3603c20e380ab0d4614b83fe9c530db8c9051fec 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 85cf1c80d646310866e7f672b237ff436dbcf509..e7731d2679a2cb7c8412692d72ba378c552d457e 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 45a3a95c73e46c1c5067c0490d24b3523f19abee..d1a77517afe1fd58096112e7254deb0e0b64ad63 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 28864e7846763669952367503553f73451e52827..e43793ce7dd651760ac6c4723d08f266f8fcaa6e 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 6a7981a86da66ddae892602fed9deb670f871626..3bdd7aacfc411817a0646aee8adaf371408ab6a9 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index d566eae6101bcfd0f4da4ce8eb5b1715e6a5ea6d..6c52b93de68ac37927535c73d29599eb17641ae6 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 70f21b766e679116cf82879ea0a020b59efa4aca..e30acb67a23c3399eccdf61ab6372edbed64e4d8 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a3255682da6d5f7a784c124880ba36b6166cc3f6..1ff2916fd0429b5b372345b781f41bf4a6d31b03 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 796f839500412009c98b25c149cec644b27528e9..32f275a3277432fa0d318dc6bcc5098a4b26bfb6 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 76be0af4820a436fcd07ecfe16103fc1737723e7..6059ee79746e8ce952c85159d6fe7327e6ca71e0 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 08b5d6e8c888899a5d4d1a7f456e3c2011326f55..a532605b6af23b49713ce3f1a0f0c0702a52ce0f 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 9e61fec0c0822b08572e287aabaa22bf06c821cd..2c92997021ea250e99721f00b88e48c602fc2078 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index c36af4ba5df2156d6e7292327485337f73d28c0c..dbe234b1a67b76daab6014999ab6825682103fbe 100644 (file)
@@ -22,6 +22,7 @@
  *
  * $Id$
  */
+#include "config.h"
 
 #if 0
 /*
index d205ad145ea64d4ab69840338ab4d600a3f12724..e2124945b0e62e3249bf00c62cee6d2422b6b2a5 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #include "handlers.h"
 /*
  * XXX - ack!!!
index b74794e25962ef3af195afeeddb4e5b78e97eeaa..b02fa0f33fbe430ae012e541ddb8e19ef6067174 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 0b2eeef3b8356685fa12eb78592e20745c45b339..2bc58fc7d2bd4d4a781a02d4dd874356c0050b8d 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a8d5649afe25d42a89fc8c4011a14f9ad2f3fab1..1cd2433b256666794bfbc8283a5e2947cee9f902 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index ff9981e5186131796059cd43bd2da28229a8574d..f06aaa90b20e779a413f0dcb6923aa0823716f68 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index de45e31b20cf18fb7978f57b3a71939852a78379..584f93a81800ff079cffe35f5d46d04ec341c458 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 4a1a9b9f4a80982d439268e3544af6ae1f8f903f..55ac6a8a1a136feb5051d5c816be9a9a51eafffd 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #include "handlers.h"
 #include "client.h"
 #include "ircd.h"
index 63b0a5102ccf60070e7092d20950f5c9c61573c6..db862b08cf5947c9b4444a8a4e262ebbf0662ce9 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 41aa223926a080ee0e31c0c40cb4505291f2febd..14ccba839de95f5e07b1ae4b6517884b1daa21ea 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 4893f01e6b826c4cb1136ede7d12b8cd2098c776..7eef88d3281444b000fae1b3a69b12951ef2acbf 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 6fa55c140b3d579508c94307b2510470e745f7d6..f5163b44ffa51c5e75f541e27bb504e8948a9d30 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index d71f7e02d601adea24823010455a12d2fb080b76..442a97d920bc3a4ff56a680a5e7696492e07c366 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index e23eb73a496b8e8a0a24aed268d06794cb7fe6e3..cd840d73325f4b4b518d6baafbde9c5d9c9429d1 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index a2d871853841b846b4686bd2e56be7e17d572f36..e82222e35144cb781fb75da8735a9aa51dec4fcf 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 0847f5366b8cb683acd9cd78e4a28ec508eae222..a6253d6320f7b93696e02962f71faa6b96a34aac 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 40fab99a32ca71701c61e9e3e604423c4db621c3..2b8faed92434c95211ec93826304285d9d3b6e8e 100644 (file)
@@ -79,6 +79,8 @@
  *            note:   it is guaranteed that parv[0]..parv[parc-1] are all
  *                    non-NULL pointers.
  */
+#include "config.h"
+
 #if 0
 /*
  * No need to include handlers.h here the signatures must match
index 06993daf14482aba14305b534a9ad86e120fe118..0d43b574124d1117a30807b59cbbf0efb77af392 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "match.h"
 #include "ircd_chattr.h"
 /*
index 4617a3670ff09117ecc1f6acd72f8358ed71b5a6..262e2eaa0a72351a0a04f938f8e2d727fa86673b 100644 (file)
@@ -23,6 +23,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "motd.h"
 #include "class.h"
 #include "client.h"
index 41ae2420dccbfe8a2e697413dfcdfefeb760c16d..e6ad9e4b5c72bfc3d29f890d31daf017e526ac98 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "msgq.h"
 #include "ircd_alloc.h"
 #include "ircd_defs.h"
@@ -52,32 +54,6 @@ static struct {
 struct MsgCounts msgBufCounts = { 0, 0 };
 struct MsgCounts msgCounts = { 0, 0 };
 
-/* XXX HACK HACK HACK XXX */
-#if 1
-/* First, force assertion checking */
-#undef NDEBUG
-#include <assert.h>
-
-/* This routine is TEMPORARY and is intended to track down a problem we're
- * having with apparent buffer overflows in this file.
- */
-static void
-msgq_integrity(void)
-{
-  struct MsgBuf *mb;
-  struct Msg *msg;
-
-  for (mb = MQData.msgs; mb; mb = mb->next)
-    assert(((unsigned long)mb) != 0x8000a0d);
-  for (mb = MQData.free_mbs; mb; mb = mb->next)
-    assert(((unsigned long)mb) != 0x8000a0d);
-  for (msg = MQData.free_msgs; msg; msg = msg->next)
-    assert(((unsigned long)msg) != 0x8000a0d);
-}
-#else
-#define msgq_integrity()       ((void)0)
-#endif /* XXX HACK HACK HACK XXX */
-
 /*
  * This routine is used to remove a certain amount of data from a given
  * queue and release the Msg (and MsgBuf) structure if needed
@@ -88,8 +64,6 @@ msgq_delmsg(struct MsgQ *mq, struct MsgQList *qlist, unsigned int *length_p)
   struct Msg *m;
   unsigned int msglen;
 
-  msgq_integrity();
-
   assert(0 != mq);
   assert(0 != qlist);
   assert(0 != qlist->head);
@@ -121,8 +95,6 @@ msgq_delmsg(struct MsgQ *mq, struct MsgQList *qlist, unsigned int *length_p)
     m->sent += *length_p; /* this much of the message has been sent */
     *length_p = 0; /* we've dealt with it all */
   }
-
-  msgq_integrity();
 }
 
 /*
@@ -131,8 +103,6 @@ msgq_delmsg(struct MsgQ *mq, struct MsgQList *qlist, unsigned int *length_p)
 void
 msgq_init(struct MsgQ *mq)
 {
-  msgq_integrity();
-
   assert(0 != mq);
 
   mq->length = 0;
@@ -141,8 +111,6 @@ msgq_init(struct MsgQ *mq)
   mq->queue.tail = 0;
   mq->prio.head = 0;
   mq->prio.tail = 0;
-
-  msgq_integrity();
 }
 
 /*
@@ -154,8 +122,6 @@ msgq_init(struct MsgQ *mq)
 void
 msgq_delete(struct MsgQ *mq, unsigned int length)
 {
-  msgq_integrity();
-
   assert(0 != mq);
 
   while (length > 0) {
@@ -168,8 +134,6 @@ msgq_delete(struct MsgQ *mq, unsigned int length)
     else
       break;
   }
-
-  msgq_integrity();
 }
 
 /*
@@ -184,17 +148,13 @@ msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count,
   struct Msg *prio;
   int i = 0;
 
-  msgq_integrity();
-
   assert(0 != mq);
   assert(0 != iov);
   assert(0 != count);
   assert(0 != len);
 
-  if (mq->length <= 0) { /* no data to map */
-    msgq_integrity();
+  if (mq->length <= 0) /* no data to map */
     return 0;
-  }
 
   if (mq->queue.head && mq->queue.head->sent > 0) { /* partial msg on norm q */
     iov[i].iov_base = mq->queue.head->msg->msg + mq->queue.head->sent;
@@ -204,10 +164,8 @@ msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count,
     queue = mq->queue.head->next; /* where we start later... */
 
     i++; /* filled an iovec... */
-    if (!--count) { /* check for space */
-      msgq_integrity();
+    if (!--count) /* check for space */
       return i;
-    }
   } else
     queue = mq->queue.head; /* start at head of queue */
 
@@ -219,10 +177,8 @@ msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count,
     prio = mq->prio.head->next; /* where we start later... */
 
     i++; /* filled an iovec... */
-    if (!--count) { /* check for space */
-      msgq_integrity();
+    if (!--count) /* check for space */
       return i;
-    }
   } else
     prio = mq->prio.head; /* start at head of prio */
 
@@ -232,10 +188,8 @@ msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count,
     *len += iov[i].iov_len;
 
     i++; /* filled an iovec... */
-    if (!--count) { /* check for space */
-      msgq_integrity();
+    if (!--count) /* check for space */
       return i;
-    }
   }
 
   for (; queue; queue = queue->next) { /* go through normal queue */
@@ -244,14 +198,10 @@ msgq_mapiov(const struct MsgQ *mq, struct iovec *iov, int count,
     *len += iov[i].iov_len;
 
     i++; /* filled an iovec... */
-    if (!--count) { /* check for space */
-      msgq_integrity();
+    if (!--count) /* check for space */
       return i;
-    }
   }
 
-  msgq_integrity();
-
   return i;
 }
 
@@ -265,8 +215,6 @@ msgq_vmake(struct Client *dest, const char *format, va_list vl)
 {
   struct MsgBuf *mb;
 
-  msgq_integrity();
-
   assert(0 != format);
 
   if (!(mb = MQData.free_mbs)) { /* do I need to allocate one? */
@@ -297,8 +245,6 @@ msgq_vmake(struct Client *dest, const char *format, va_list vl)
     MQData.msgs->prev_p = &mb->next;
   MQData.msgs = mb;
 
-  msgq_integrity();
-
   return mb;
 }
 
@@ -323,8 +269,6 @@ msgq_append(struct Client *dest, struct MsgBuf *mb, const char *format, ...)
 {
   va_list vl;
 
-  msgq_integrity();
-
   assert(0 != mb);
   assert(0 != format);
 
@@ -346,8 +290,6 @@ msgq_append(struct Client *dest, struct MsgBuf *mb, const char *format, ...)
   mb->msg[mb->length] = '\0'; /* not strictly necessary */
 
   assert(mb->length < sizeof(mb->msg));
-
-  msgq_integrity();
 }
 
 /*
@@ -357,8 +299,6 @@ msgq_append(struct Client *dest, struct MsgBuf *mb, const char *format, ...)
 void
 msgq_clean(struct MsgBuf *mb)
 {
-  msgq_integrity();
-
   assert(0 != mb);
   assert(0 < mb->ref);
   assert(0 != mb->prev_p);
@@ -375,8 +315,6 @@ msgq_clean(struct MsgBuf *mb)
 
     msgBufCounts.used--; /* decrement the usage count */
   }
-
-  msgq_integrity();
 }
 
 /*
@@ -388,8 +326,6 @@ msgq_add(struct MsgQ *mq, struct MsgBuf *mb, int prio)
   struct MsgQList *qlist;
   struct Msg *msg;
 
-  msgq_integrity();
-
   assert(0 != mq);
   assert(0 != mb);
   assert(0 < mb->ref);
@@ -424,8 +360,6 @@ msgq_add(struct MsgQ *mq, struct MsgBuf *mb, int prio)
 
   mq->length += mb->length; /* update the queue length */
   mq->count++; /* and the queue count */
-
-  msgq_integrity();
 }
 
 /*
@@ -435,8 +369,6 @@ void
 msgq_count_memory(size_t *msg_alloc, size_t *msg_used, size_t *msgbuf_alloc,
                  size_t *msgbuf_used)
 {
-  msgq_integrity();
-
   assert(0 != msg_alloc);
   assert(0 != msg_used);
   assert(0 != msgbuf_alloc);
@@ -446,8 +378,6 @@ msgq_count_memory(size_t *msg_alloc, size_t *msg_used, size_t *msgbuf_alloc,
   *msg_used = msgCounts.used * sizeof(struct Msg);
   *msgbuf_alloc = msgCounts.alloc * sizeof(struct MsgBuf);
   *msgbuf_used = msgCounts.used * sizeof(struct MsgBuf);
-
-  msgq_integrity();
 }
 
 /*
index 6bdca9951ff0b31e7a9cb06eecdfb6a94995e460..b0474a028aacf5be0a59be5cfdec52f8c7a214ff 100644 (file)
@@ -18,6 +18,7 @@
  *
  * $Id$
  */
+#include "config.h"
 
 #include "numnicks.h"
 #include "client.h"
index cceb1d3995eae24799649fb4b939868e447191a6..22016f1abc24fc05bf23822b76c834a1a4930add 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "opercmds.h"
 #include "class.h"
 #include "client.h"
index acb00569009100849af9bc227e3cdbe9d4f673d6..f26cb737b5d8accb7afeb109e656e77f5527857c 100644 (file)
  * $Id$
  *
  */
+#include "config.h"
+
 #define _XOPEN_SOURCE  /* make limits.h #define IOV_MAX */
 
 #include "ircd_osdep.h"
-#include "config.h"
 #include "msgq.h"
 
 #include <assert.h>
index 8c654597e8e84c5f42452c469be90aa48a1a69c5..73c2f7942736df1bd48a3d940d6a12a31a06c563 100644 (file)
  * $Id$
  *
  */
+#include "config.h"
+
 #define _XOPEN_SOURCE  /* make limits.h #define IOV_MAX */
 
 #include "ircd_osdep.h"
-#include "config.h"
 #include "msgq.h"
 
 #include <assert.h>
index b17dbe43fac0a87db439b6ef572b0104dcedbc8e..7e371295b3088fe08b28a1ba43d91a4db38c56a5 100644 (file)
@@ -19,6 +19,8 @@
  * $Id$
  *
  */
+#include "config.h"
+
 #define _XOPEN_SOURCE  /* make limits.h #define IOV_MAX */
 
 #include "ircd_osdep.h"
index 88a3cd12a398ada400b48dfe30c892f302440e5a..805d87f0a52260c0844bbb7a0fc9749f1cb07c45 100644 (file)
@@ -19,6 +19,8 @@
  * $Id$
  *
  */
+#include "config.h"
+
 #define _XOPEN_SOURCE /* Need this for IOV_MAX */
 
 /* These typedef's are needed for socket.h to be happy. Bleep PROMISES to make
@@ -30,7 +32,6 @@ typedef unsigned int u_int;
 typedef unsigned long u_long;
 
 #include "ircd_osdep.h"
-#include "config.h"
 #include "msgq.h"
 
 #include <assert.h>
index 9c3c35387205656eece9a1340e4805a27c02047c..e4ba40fb7349dd120262d853f99043a115009575 100644 (file)
@@ -19,6 +19,8 @@
  * $Id$
  *
  */
+#include "config.h"
+
 #define _XOPEN_SOURCE  /* make limits.h #define IOV_MAX */
 
 #include "ircd_osdep.h"
index 12323a565c20c3d144883330344a6a8aebe73b4a..59f8cd2f9a25469a1d56f8f1919a008e3d2c1f02 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "packet.h"
 #include "client.h"
 #include "ircd.h"
index ecc91a559399d72731d22f4dfa20868e9819c78f..77a37ee3f75f5719936f674bf49ca464ceeaf457 100644 (file)
@@ -20,6 +20,7 @@
  * $Id$
  */
 #include "config.h"
+
 #include "parse.h"
 #include "client.h"
 #include "channel.h"
index 95c9b9138116be9130bf2ac6100d2fe20e7f99ec..30a69c020aa159744cbebe6fadef7042fefca1f1 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "querycmds.h"
 
 #include <string.h>
index 528b8d42c6add083305ecb7e898fa93711bda87e..e85b228a363c6490b40b14d1480627b724a4f28e 100644 (file)
@@ -17,6 +17,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "random.h"
 #include "client.h"
 #include "ircd_log.h"
index fea222ec88a18708774878e8cb294bd48a129093..d9eb03579a75b5180952ad70b0f47c122b656d8b 100644 (file)
@@ -10,6 +10,8 @@
  *     added callbacks and reference counting of returned hostents.
  *     --Bleep (Thomas Helvey <tomh@inxpress.net>)
  */
+#include "config.h"
+
 #include "res.h"
 #include "client.h"
 #include "ircd.h"
diff --git a/ircd/runmalloc.c b/ircd/runmalloc.c
deleted file mode 100644 (file)
index 5c4d76d..0000000
+++ /dev/null
@@ -1,446 +0,0 @@
-/*
- * Run's malloc/realloc/calloc/free DEBUG tools v2.0
- *
- * (c) Copyright 1996, 1997
- *
- * Author:
- *
- * 1024/624ACAD5 1997/01/26 Carlo Wood, Run on IRC <carlo@runaway.xs4all.nl>
- * Key fingerprint = 32 EC A7 B6 AC DB 65 A6  F6 F6 55 DD 1C DC FF 61
- * Get key from pgp-public-keys server or
- * finger carlo@runaway.xs4all.nl for public key (dialin, try at 21-22h GMT).
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
- */
-#include "runmalloc.h"
-#include "client.h"
-#include "ircd.h"
-#include "numeric.h"
-#include "numnicks.h"
-#include "s_debug.h"
-#include "send.h"
-#include "struct.h"
-#include "sys.h"
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#if defined(DEBUGMALLOC)
-
-#define MALLOC_HASHTABLE_SIZE 16384
-#define MallocHash(x) \
-    ((unsigned int)(((((long int)(x) >> 4) * 0xDEECE66D) >> 16) & (long int)0x3fff))
-#define MAGIC_PREFIX 0xe4c483a1
-#define MAGIC_POSTFIX 0x435bd0fa
-
-#ifdef MEMLEAKSTATS
-typedef struct {
-  const char *filename;
-  int line;
-  int number_of_allocations;
-#ifdef MEMSIZESTATS
-  size_t size;
-#endif
-} location_st;
-
-#define LOCSIZE 1024            /* Maximum of 256 different locations */
-static location_st location[LOCSIZE];
-static unsigned int locations;  /* Counter */
-
-static unsigned int find_location(const char *filename, int line)
-{
-  unsigned int hash;
-  hash = line & 0xff;
-  while (location[hash].filename && (location[hash].line != line ||
-      location[hash].filename != filename))
-    if (++hash == LOCSIZE)
-      hash = 0;
-  if (!location[hash].filename)
-  {
-    /* New location */
-    ++locations;
-    location[hash].filename = filename;
-    location[hash].line = line;
-  }
-  return hash;
-}
-#endif /* MEMLEAKSTATS */
-
-#ifdef MEMMAGICNUMS
-/* The size of this struct should be a multiple of 4 bytes, just in case... */
-typedef struct {
-  unsigned int prefix_magicnumber;
-} prefix_blk_st;
-
-typedef struct {
-  unsigned int postfix_magicnumber;
-} postfix_blk_st;
-
-#define SIZEOF_POSTFIX sizeof(postfix_blk_st)
-#define SIZEOF_PREFIX sizeof(prefix_blk_st)
-#define HAS_POSTFIX
-
-#else /* !MEMMAGICNUMS */
-typedef void prefix_blk_st;
-#define SIZEOF_PREFIX 0
-#define SIZEOF_POSTFIX 0
-#endif /* MEMMAGICNUMS */
-
-typedef struct hash_entry_st {
-  struct hash_entry_st *next;
-  prefix_blk_st *ptr;
-#ifdef MEMSIZESTATS
-  size_t size;
-#endif
-#ifdef MEMLEAKSTATS
-  unsigned int location;
-#ifdef MEMTIMESTATS
-  time_t when;
-#endif /* MEMTIMESTATS */
-#endif /* MEMLEAKSTATS */
-} hash_entry_st;
-
-#define memblkp(prefix_ptr) \
-    ((void *)((size_t)prefix_ptr + SIZEOF_PREFIX))
-#define prefixp(memblk_ptr) \
-    ((prefix_blk_st *)((size_t)memblk_ptr - SIZEOF_PREFIX))
-#define postfixp(memblk_ptr, size) \
-    ((postfix_blk_st *)((size_t)memblk_ptr + size))
-
-static hash_entry_st *hashtable[MALLOC_HASHTABLE_SIZE];
-#ifdef MEMSIZESTATS
-static size_t mem_size = 0;     /* Number of allocated bytes  */
-static unsigned int alloc_cnt = 0;      /* Number of allocated blocks */
-#endif
-
-#ifdef MEMLEAKSTATS
-void report_memleak_stats(struct Client *sptr, int parc, char *parv[])
-{
-  unsigned int hash;
-  location_st *loc = location;
-
-#ifdef MEMTIMESTATS
-  time_t till = CurrentTime;
-  time_t from = me.since;
-  if (parc > 3)
-  {
-    location_st tmp_loc[LOCSIZE];
-    hash_entry_st **start;
-    memset(tmp_loc, 0, sizeof(tmp_loc));
-    if (parc > 3)
-      till -= atoi(parv[3]);
-    if (parc > 4)
-      from += atoi(parv[4]);
-    for (start = &hashtable[0];
-        start < &hashtable[MALLOC_HASHTABLE_SIZE]; ++start)
-    {
-      hash_entry_st *hash_entry;
-      for (hash_entry = *start; hash_entry; hash_entry = hash_entry->next)
-        if (hash_entry->when >= from && hash_entry->when <= till)
-        {
-#ifdef MEMSIZESTATS
-          tmp_loc[hash_entry->location].size += hash_entry->size;
-#endif
-          tmp_loc[hash_entry->location].number_of_allocations++;
-        }
-    }
-    loc = tmp_loc;
-    if (MyUser(sptr) || Protocol(sptr->from) < 10)
-      sendto_one(sptr, ":%s NOTICE %s :Memory allocated between " TIME_T_FMT
-          " (server start + %s s) and " TIME_T_FMT " (CurrentTime - %s s):",
-          me.name, parv[0], from, parc > 4 ? parv[4] : "0", till,
-          parc > 3 ? parv[3] : "0");
-    else
-      sendto_one(sptr, "%s NOTICE %s%s :Memory allocated between " TIME_T_FMT
-          " (server start + %s s) and " TIME_T_FMT " (CurrentTime - %s s):",
-          NumServ(&me), NumNick(sptr), from, parc > 4 ? parv[4] : "0", till,
-          parc > 3 ? parv[3] : "0");
-  }
-#endif /* MEMTIMESTATS */
-  for (hash = 0; hash < LOCSIZE; ++hash)
-    if (loc[hash].number_of_allocations > 0)
-      sendto_one(sptr, rpl_str(RPL_STATMEM), me.name, parv[0],
-          loc[hash].number_of_allocations,
-          location[hash].line, location[hash].filename
-#ifdef MEMSIZESTATS
-          , loc[hash].size
-#endif
-          );
-}
-
-void *RunMalloc_memleak(size_t size, int line, const char *filename)
-#else   /* !MEMLEAKSTATS */
-void *MyMalloc(size_t size)
-#endif  /* MEMLEAKSTATS */
-{
-  prefix_blk_st *ptr;
-  hash_entry_st *hash_entry;
-  hash_entry_st **hashtablep;
-
-#ifdef HAS_POSTFIX
-  size += 3;
-  size &= ~3;
-#endif
-
-  if (!((ptr = (prefix_blk_st *)
-      malloc(SIZEOF_PREFIX + size + SIZEOF_POSTFIX)) &&
-      (hash_entry = (hash_entry_st *) malloc(sizeof(hash_entry_st)))))
-  {
-    if (ptr)
-      free(ptr);
-    (*noMemHandler)();
-    return 0;
-  }
-
-  hashtablep = &hashtable[MallocHash(ptr)];
-  hash_entry->next = *hashtablep;
-  *hashtablep = hash_entry;
-  hash_entry->ptr = ptr;
-#ifdef MEMLEAKSTATS
-#ifdef MEMTIMESTATS
-  hash_entry->when = CurrentTime;
-#endif
-  location[(hash_entry->location =
-      find_location(filename, line))].number_of_allocations++;
-#endif /* MEMLEAKSTATS */
-#ifdef MEMSIZESTATS
-  hash_entry->size = size;
-#ifdef MEMLEAKSTATS
-  location[hash_entry->location].size += size;
-#endif
-  mem_size += size;
-  ++alloc_cnt;
-#endif /* MEMSIZESTATS */
-#ifdef MEMMAGICNUMS
-  ptr->prefix_magicnumber = MAGIC_PREFIX;
-  postfixp(memblkp(ptr), size)->postfix_magicnumber = MAGIC_POSTFIX;
-#endif
-
-  Debug((DEBUG_MALLOC, "MyMalloc(%u) = %p", size, memblkp(ptr)));
-
-  return memblkp(ptr);
-}
-
-#ifdef MEMLEAKSTATS
-void *RunCalloc_memleak(size_t nmemb, size_t size,
-    int line, const char *filename)
-#else
-void *MyCalloc(size_t nmemb, size_t size)
-#endif /* MEMLEAKSTATS */
-{
-  void *ptr;
-  size *= nmemb;
-#ifdef MEMLEAKSTATS
-  if ((ptr = RunMalloc_memleak(size, line, filename)))
-#else
-  if ((ptr = MyMalloc(size)))
-#endif /* MEMLEAKSTATS */
-    memset(ptr, 0, size);
-  return ptr;
-}
-
-int MyFree_test(void *memblk_ptr)
-{
-  prefix_blk_st* prefix_ptr = prefixp(memblk_ptr);
-  hash_entry_st* hash_entry;
-  for (hash_entry = hashtable[MallocHash(prefix_ptr)];
-      hash_entry && hash_entry->ptr != prefix_ptr;
-      hash_entry = hash_entry->next);
-  return hash_entry ? 1 : 0;
-}
-
-void MyFree(void* memblk_ptr)
-{
-  prefix_blk_st* prefix_ptr = prefixp(memblk_ptr);
-  hash_entry_st* hash_entry;
-  hash_entry_st* prev_hash_entry = NULL;
-  unsigned int hash = MallocHash(prefix_ptr);
-
-  Debug((DEBUG_MALLOC, "MyFree(%p)", memblk_ptr));
-
-  if (!memblk_ptr)
-    return;
-
-  for (hash_entry = hashtable[hash];
-      hash_entry && hash_entry->ptr != prefix_ptr;
-      prev_hash_entry = hash_entry, hash_entry = hash_entry->next);
-  if (!hash_entry)
-  {
-    Debug((DEBUG_FATAL, "FREEING NON MALLOC PTR !!!"));
-    assert(0 != hash_entry);
-  }
-#ifdef MEMMAGICNUMS
-  if (prefix_ptr->prefix_magicnumber != MAGIC_PREFIX)
-  {
-    Debug((DEBUG_FATAL, "MAGIC_PREFIX CORRUPT !"));
-    assert(MAGIC_PREFIX == prefix_ptr->prefix_magicnumber);
-  }
-  prefix_ptr->prefix_magicnumber = 12345678;
-  if (postfixp(memblk_ptr, hash_entry->size)->postfix_magicnumber
-      != MAGIC_POSTFIX)
-  {
-    Debug((DEBUG_FATAL, "MAGIC_POSTFIX CORRUPT !"));
-    assert(MAGIC_POSTFIX == 
-           postfixp(memblk_ptr, hash_entry->size)->postfix_magicnumber);
-  }
-  postfixp(memblk_ptr, hash_entry->size)->postfix_magicnumber = 87654321;
-#endif /* MEMMAGICNUMS */
-
-  if (prev_hash_entry)
-    prev_hash_entry->next = hash_entry->next;
-  else
-    hashtable[hash] = hash_entry->next;
-
-#ifdef MEMLEAKSTATS
-  location[hash_entry->location].number_of_allocations--;
-#endif
-
-#ifdef MEMSIZESTATS
-  mem_size -= hash_entry->size;
-  --alloc_cnt;
-#ifdef MEMLEAKSTATS
-  location[hash_entry->location].size -= hash_entry->size;
-#endif
-#ifdef DEBUGMODE
-  /* Put 0xfefefefe.. in freed memory */
-  memset(prefix_ptr, 0xfe, hash_entry->size + SIZEOF_PREFIX);
-#endif /* DEBUGMODE */
-#endif /* MEMSIZESTATS */
-
-  free(hash_entry);
-  free(prefix_ptr);
-}
-
-#ifdef MEMLEAKSTATS
-void *RunRealloc_memleak(void *memblk_ptr, size_t size,
-    int line, const char *filename)
-#else
-void *MyRealloc(void *memblk_ptr, size_t size)
-#endif /* MEMLEAKSTATS */
-{
-  prefix_blk_st *ptr;
-  prefix_blk_st *prefix_ptr = prefixp(memblk_ptr);
-  hash_entry_st *hash_entry, *prev_hash_entry = NULL;
-  hash_entry_st **hashtablep;
-  unsigned int hash;
-
-  if (!memblk_ptr)
-#ifdef MEMLEAKSTATS
-    return RunMalloc_memleak(size, line, filename);
-#else
-    return MyMalloc(size);
-#endif /* MEMLEAKSTATS */
-  if (!size)
-  {
-    MyFree(memblk_ptr);
-    return NULL;
-  }
-
-  for (hash_entry = hashtable[(hash = MallocHash(prefix_ptr))];
-      hash_entry && hash_entry->ptr != prefix_ptr;
-      prev_hash_entry = hash_entry, hash_entry = hash_entry->next);
-  if (!hash_entry)
-  {
-    Debug((DEBUG_FATAL, "REALLOCATING NON MALLOC PTR !!!"));
-    assert(0 != hash_entry);
-  }
-
-#ifdef MEMMAGICNUMS
-  if (prefix_ptr->prefix_magicnumber != MAGIC_PREFIX)
-  {
-    Debug((DEBUG_FATAL, "MAGIC_PREFIX CORRUPT !"));
-    assert(MAGIC_PREFIX == prefix_ptr->prefix_magicnumber);
-  }
-  if (postfixp(memblk_ptr, hash_entry->size)->postfix_magicnumber
-      != MAGIC_POSTFIX)
-  {
-    Debug((DEBUG_FATAL, "MAGIC_POSTFIX CORRUPT !"));
-    assert(MAGIC_POSTFIX ==
-           postfixp(memblk_ptr, hash_entry->size)->postfix_magicnumber);
-  }
-#endif /* MEMMAGICNUMS */
-
-#ifdef HAS_POSTFIX
-  size += 3;
-  size &= ~3;
-#endif
-
-#ifdef MEMMAGICNUMS
-  postfixp(memblkp(prefix_ptr), hash_entry->size)->postfix_magicnumber = 123456;
-#endif
-#ifdef MEMLEAKSTATS
-  location[hash_entry->location].number_of_allocations--;
-#ifdef MEMSIZESTATS
-  location[hash_entry->location].size -= hash_entry->size;
-#endif /* MEMSIZESTATS */
-#endif /* MEMLEAKSTATS */
-
-  if (!(ptr =
-      (prefix_blk_st *) realloc(prefix_ptr,
-      SIZEOF_PREFIX + size + SIZEOF_POSTFIX)))
-  {
-    (*noMemHandler)();
-    return 0;
-  }
-
-  if (prev_hash_entry)
-    prev_hash_entry->next = hash_entry->next;
-  else
-    hashtable[hash] = hash_entry->next;
-
-  hashtablep = &hashtable[MallocHash(ptr)];
-  hash_entry->next = *hashtablep;
-  *hashtablep = hash_entry;
-  hash_entry->ptr = ptr;
-#ifdef MEMLEAKSTATS
-#ifdef MEMTIMESTATS
-  hash_entry->when = CurrentTime;
-#endif
-  location[(hash_entry->location =
-      find_location(filename, line))].number_of_allocations++;
-#endif /* MEMLEAKSTATS */
-#ifdef MEMSIZESTATS
-  mem_size += size - hash_entry->size;
-  hash_entry->size = size;
-#ifdef MEMLEAKSTATS
-  location[hash_entry->location].size += size;
-#endif
-#endif /* MEMSIZESTATS */
-#ifdef MEMMAGICNUMS
-  postfixp(memblkp(ptr), size)->postfix_magicnumber = MAGIC_POSTFIX;
-#endif
-
-  Debug((DEBUG_MALLOC, ": MyRealloc(%p, %u) = %p",
-      memblk_ptr, size, memblkp(ptr)));
-
-  return memblkp(ptr);
-}
-
-#ifdef MEMSIZESTATS
-unsigned int get_alloc_cnt(void)
-{
-  return alloc_cnt;
-}
-
-size_t get_mem_size(void)
-{
-  return mem_size;
-}
-#endif /* MEMSIZESTATS */
-
-#endif /* !defined(DEBUGMALLOC) */
index 28158f7766a904b782bacccee7abe1c01ddc8ce8..01c207af95ef495ef56ef6337afce96c1337e4c7 100644 (file)
@@ -27,6 +27,8 @@
  *     any messages from it.
  *     --Bleep  Thomas Helvey <tomh@inxpress.net>
  */
+#include "config.h"
+
 #include "s_auth.h"
 #include "client.h"
 #include "IPcheck.h"
index 752d12524444d0f26421daccd32c0018b6de9d03..020336e0b79cda580ab523ac542fc07e66e17087 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "s_bsd.h"
 #include "client.h"
 #include "IPcheck.h"
index fe056e530874b82a754838a9400db6dbea9afc5c..865270d5aa336bc5ed894c857e03521839a91a6c 100644 (file)
@@ -19,8 +19,9 @@
  *
  * $Id$
  */
-#include "s_conf.h"
+#include "config.h"
 
+#include "s_conf.h"
 #include "IPcheck.h"
 #include "class.h"
 #include "client.h"
@@ -832,8 +833,8 @@ void conf_add_server(const char* const* fields, int count)
   server->next = serverConfList;
   serverConfList = server;
 
-  // if (INADDR_NONE == server->address.s_addr)
-    // lookup_confhost(server);
+  /* if (INADDR_NONE == server->address.s_addr) */
+    /* lookup_confhost(server); */
 }
 
 void conf_add_deny(const char* const* fields, int count, int ip_kill)
index 5b54dd5fd9a10ce9aa8ca775a40a37f82484b329..8e3728a29239e5bd894f28621ab21bd0e2c6cd4e 100644 (file)
@@ -20,6 +20,8 @@
  * $Id$
  *
  */
+#include "config.h"
+
 #include "s_debug.h"
 #include "channel.h"
 #include "class.h"
index e887eb339c44c08af8447574c2f78d2d7077ef3b..002a9485b5eccc4279719c49fe11def92fc285b5 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "numeric.h"
 #include "s_debug.h"
 #include "sprintf_irc.h"
index 1314b663ad3d5a7e89bb9ad9caa2f78f8c5ffdf9..a21707544bef90f899b106f03d1c3007ae30fc1a 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "s_misc.h"
 #include "IPcheck.h"
 #include "channel.h"
index 5451ad16ac9ad4c6fb94836526653bc1689e087a..2fb84f419fc7b51e17dfe9c8ec8193196af7adb4 100644 (file)
@@ -20,6 +20,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "s_numeric.h"
 #include "channel.h"
 #include "client.h"
index 8e0524c0ff95ecc3dc638e980a0974b504c02a4c..4777df1280abb8b148435c8939bedfe3593571e0 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "s_serv.h"
 #include "IPcheck.h"
 #include "channel.h"
index 38ea8f70e51c5ca62ac173240d5c6ea7ca931ae9..38ecc7cda24c65c9355128f19ce0a1d1bd73075c 100644 (file)
@@ -21,6 +21,7 @@
  *
  * $Id$
  */
+#include "config.h"
 
 #include "s_stats.h"
 #include "class.h"
index bd732904fff7565fc1519cb32e8f5e71b2fe864b..0a71c4a742b1370d67fed4851949b6b008a0f3ea 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "s_user.h"
 #include "IPcheck.h"
 #include "channel.h"
index 04401f3447b137f49aba2b160003f3e7664f1d80..89ee2b908f010e91f28d91980950009ec508c849 100644 (file)
@@ -19,6 +19,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "send.h"
 #include "channel.h"
 #include "class.h"
index 6fce6c8fece85f8d235faf30ec74ef4d1617390b..a9dc53b71f5246787a15c9edea8cee4809592508 100644 (file)
@@ -26,6 +26,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "sprintf_irc.h"
 #include "sys.h"
 #include <stdio.h>
index 93a94e362bc6235c112e19aecc7926020671b821..d05395fead12b1eb6b5354d115d3916eeb5896b9 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "support.h"
 #include "fileio.h"
 #include "ircd.h"
index e5554f9b9f48967228d08353e27898e2fd35dbe5..3ba8da44fb68144673b5b5bb80cc605b1bec9cc7 100644 (file)
@@ -41,6 +41,7 @@
  * both admins and coders.
  *
  */
+#include "config.h"
 
 #include "ircd_chattr.h"
 #include <stdlib.h>
index 3db630d4733829cefbe6ec2350d0d64ca16ab80c..1c35a7f21c018ed14aa41bcb67de211c87f038df 100644 (file)
@@ -18,6 +18,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "uping.h"
 #include "client.h"
 #include "ircd.h"
index b51d2f9e8fcc8564af1a9354f6834b434b44e810..84d6a9c869444b7c99bfc744d46fe0cea25f5aad 100644 (file)
@@ -25,6 +25,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "userload.h"
 #include "client.h"
 #include "ircd.h"
index f1b2d50c50da31aedc43e3982b8efd83aa2f2808..69829a8fe7bccd592a3200bb11f046f6ec678963 100644 (file)
@@ -22,6 +22,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "whocmds.h"
 #include "channel.h"
 #include "client.h"
index d8c0db20063c5a01371533de07c740bebfaf7c50..48ab1035d497af62baeaa47ac5691a0f8327913b 100644 (file)
@@ -34,6 +34,8 @@
  *
  * $Id$
  */
+#include "config.h"
+
 #include "whowas.h"
 #include "client.h"
 #include "ircd.h"