Mail Archives: djgpp-workers/2002/10/20/19:59:30
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 <string.h> 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.
<http://cbfalconer.home.att.net> USE worldnet address!
- Raw text -