www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/10/20/12:32:22

From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
Message-Id: <200210201629.g9KGTdW14494@speedy.ludd.luth.se>
Subject: CBFalconer's malloc
To: cbfalconer AT yahoo DOT com, DJGPP-WORKERS <djgpp-workers AT delorie DOT com>
Date: Sun, 20 Oct 2002 18:29:39 +0200 (CEST)
X-Mailer: ELM [version 2.4ME+ PL78 (25)]
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com

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;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019