فهرست منبع

* Changed DEBUG_MEM to DEBUG
* Enabled DEBUG_CONTEXT as it seemed to create corrupt binaries without


svn: 1594

Bryan Drewery 21 سال پیش
والد
کامیت
8d1c20bfa5
4فایلهای تغییر یافته به همراه12 افزوده شده و 12 حذف شده
  1. 1 1
      Makefile.in
  2. 1 1
      doc/UPDATES
  3. 9 9
      src/debug.c
  4. 1 1
      src/debug.h

+ 1 - 1
Makefile.in

@@ -32,7 +32,7 @@ STRIP = @STRIP@
 #LIBS = @LIBS@ @ZLIB@ @SSL@ 
 LIBS = @LIBS@ @ZLIB@ 
 
-DEBCXXFLAGS = -DDEBUG_ASSERT -DDEBUG_MEM -Dinline= -fno-inline -g3 -ggdb3
+DEBCXXFLAGS = -DDEBUG_ASSERT -DDEBUG -Dinline= -fno-inline -g3 -ggdb3
 CFLGS = @GCC3@
 _CFLGS = -fno-strict-aliasing -W -Wformat \
 #-Wshadow -Wnested-externs -Wno-format-y2k \

+ 1 - 1
doc/UPDATES

@@ -3,7 +3,7 @@ This is a summary of ChangeLog basically.
 1.2.1
 
 * No longer reading in /etc/hosts, still reading .hosts though
-* Disabled all the DEBUG emailing and context shit, it was utterly pointless
+- Disabled all the DEBUG emailing and context shit, it was utterly pointless
 * Fixed closed-invite not being checked correctly.
 * Fixed segfault while relaying.
 

+ 9 - 9
src/debug.c

@@ -44,7 +44,7 @@ void setlimits()
 {
 #ifndef CYGWIN_HACKS
   struct rlimit plim, fdlim, corelim;
-#ifndef DEBUG_MEM
+#ifndef DEBUG
 /*  struct rsslim, stacklim;
   rsslim.rlim_cur = 30720;
   rsslim.rlim_max = 30720;
@@ -58,12 +58,12 @@ void setlimits()
   plim.rlim_max = 40;
   corelim.rlim_cur = 0;
   corelim.rlim_max = 0;
-#else /* DEBUG_MEM */
+#else /* DEBUG */
   plim.rlim_cur = 500;
   plim.rlim_max = 500;
   corelim.rlim_cur = RLIM_INFINITY;
   corelim.rlim_max = RLIM_INFINITY;
-#endif /* !DEBUG_MEM */
+#endif /* !DEBUG */
   setrlimit(RLIMIT_CORE, &corelim);
   setrlimit(RLIMIT_NPROC, &plim);
   fdlim.rlim_cur = 300;
@@ -183,11 +183,11 @@ static void got_bus(int z)
   write_debug();
 #endif
   fatal("BUS ERROR -- CRASHING!", 1);
-#ifdef DEBUG_MEM
+#ifdef DEBUG
   kill(getpid(), SIGBUS);
 #else
   exit(1);
-#endif /* DEBUG_MEM */
+#endif /* DEBUG */
 }
 
 #ifndef CYGWIN_HACKS
@@ -256,11 +256,11 @@ static void got_segv(int z)
   write_debug();
 #endif
   fatal("SEGMENT VIOLATION -- CRASHING!", 1);
-#ifdef DEBUG_MEM
+#ifdef DEBUG
   raise(SIGSEGV);
 #else
   exit(1);
-#endif /* DEBUG_MEM */
+#endif /* DEBUG */
 }
 
 static void got_fpe(int) __attribute__ ((noreturn));
@@ -296,11 +296,11 @@ static void got_abort(int z)
   write_debug();
 #endif
   fatal("GOT SIGABRT -- CRASHING!", 1);
-#ifdef DEBUG_MEM
+#ifdef DEBUG
   raise(SIGSEGV);
 #else
   exit(1);
-#endif /* DEBUG_MEM */
+#endif /* DEBUG */
 }
 
 static void got_cont(int z)

+ 1 - 1
src/debug.h

@@ -10,7 +10,7 @@
  * WARNING: DO NOT send in bug reports if you undefine this!
  */
 
-//#define DEBUG_CONTEXT
+#define DEBUG_CONTEXT
 
 /*
  *    Handy aliases for memory tracking and core dumps