Mail Archives: geda-user/2016/02/16/00:54:41
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 -