Message-ID: <3DB32764.292952DC@yahoo.com> Date: Sun, 20 Oct 2002 18:00:04 -0400 From: CBFalconer Organization: Ched Research X-Mailer: Mozilla 4.75 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: djgpp-workers AT delorie DOT com CC: Martin Str|mberg Subject: Re: CBFalconer's malloc References: <200210201629 DOT g9KGTdW14494 AT speedy DOT ludd DOT luth DOT se> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Martin Str|mberg wrote: > > This must be applied to CBFalconer's malloc routines to make it > compile in libc: > > --- nmalloc.c Sun Mar 17 01:59:44 2002 > +++ ../djgpp/src/libc/ansi/stdlib/nmalloc.c Fri Oct 18 17:59:29 2002 > @@ -14,11 +14,16 @@ > /* suitable critical section call could make it such. Nothing */ > /* herein executes for any unusual length of time (with NDEBUG). */ > > +#define NDEBUG 1 > + > #ifndef NDEBUG > # define DEBUGM 1 /* malloc */ > # define DEBUGF 1 /* free */ > # define DEBUGR 1 /* realloc */ > #else > +# define DEBUGM 0 /* malloc */ > +# define DEBUGF 0 /* free */ > +# define DEBUGR 0 /* realloc */ > # define nmalloc malloc > # define nfree free > # define nrealloc realloc > @@ -280,7 +285,7 @@ > > /* 1------------------1 */ > > -static void badcallabort(char *msg, int lgh, memblockp m) > +static void badcallabort(const char *msg, int lgh, memblockp m) > { > #if DEBUGM || DEBUGF || DEBUGR > DBGEOLN; I originally designed that to suppress the debuggery via the makefile with the make command line, which I suppose is incompatible with building the library. Is there anything routinely defined when library building that would make compiling debug test versions easy? Maybe the solution is to use a make define to build the debug versions, rather than the inverse? Glad someone is looking at it. Did you pick it off my web site to ensure it agrees with my latest (which is at least 6 months ago, and I have forgotten just what I did :-) To find the application that triggered my doing all this, see my hashlib. I found that a file was not updated in its zip, which omitted a #include somewhere, and I haven't updated the displayed version yet. I am trying to learn enough shell programming to make the regression tests run under Cygwin, and thus hopefully all unices. -- Chuck F (cbfalconer AT yahoo DOT com) (cbfalconer AT worldnet DOT att DOT net) Available for consulting/temporary embedded and systems. USE worldnet address!