www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2016/02/16/00:54:41

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Date: Tue, 16 Feb 2016 06:55:29 +0100 (CET)
X-X-Sender: igor2 AT igor2priv
To: geda-user AT delorie DOT com
X-Debug: to=geda-user AT delorie DOT com from="gedau AT igor2 DOT repo DOT hu"
From: gedau AT igor2 DOT repo DOT hu
Subject: [geda-user] [pcb-rnd] dmalloc
Message-ID: <alpine.DEB.2.00.1602160645540.7885@igor2priv>
User-Agent: Alpine 2.00 (DEB 1167 2008-08-23)
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com

Hi all,

I figured how to keep dmalloc support in pcb-rnd without having to have it 
included in all .c files. The reason I wanted to do this is this: 
if one adds a new file and forgets to add the 3 line boiler plate code, it 
probably goes unnoticed while it may make a subtle difference in the 
output.

Since all source files generally need to include config.h, and 
HAVE_LIBDMALLOC is defined there anyway, I decided to move the #include 
there too. This means if a source file did work with dmalloc before the 
modification, it surely will work after the modification since it had to 
include config.h already for the feature macro.

I've written an awk fewliner that edited out the

#ifdef HAVE_LIBDMALLOC
#include <dmalloc.h>
#endif

lines from all source files.

Just sharing this because I believe mainline pcb could benefit from a 
similar change.

Regards,

Igor2

- Raw text -


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