Index: trunk/config.h.in =================================================================== --- trunk/config.h.in (revision 4516) +++ trunk/config.h.in (revision 4517) @@ -211,5 +211,20 @@ /* ./configure --workaround requests: */ @?/local/pcb/workaround_defs@ +/* Make sure to catch usage of non-portable functions in debug mode + This is in here only because config.h should be included from every source + file. */ +#ifndef NDEBUG +# undef strdup +# undef strndup +# undef snprintf +# undef round +# define strdup never_use_strdup__use_pcb_strdup +# define strndup never_use_strndup__use_pcb_strndup +# define snprintf never_use_snprintf__use_pcb_snprintf +# define round never_use_round__use_pcb_round #endif + + +#endif @] Index: trunk/scconfig/Rev.h =================================================================== --- trunk/scconfig/Rev.h (revision 4516) +++ trunk/scconfig/Rev.h (revision 4517) @@ -1 +1 @@ -static const int myrev = 4509; +static const int myrev = 4517; Index: trunk/scconfig/Rev.tab =================================================================== --- trunk/scconfig/Rev.tab (revision 4516) +++ trunk/scconfig/Rev.tab (revision 4517) @@ -1,4 +1,4 @@ -4509 configure unravel - the big cleanup, moving code and files +4517 configure unravel - the big cleanup, moving code and files 4450 configure io_lihata plugin config and 3rd party lib dependency fix 4398 configure io_kicad plugin interdeps and enable io_kicad by default 4375 configure custom output style support in io_lihata Index: trunk/src/global.h =================================================================== --- trunk/src/global.h (revision 4516) +++ trunk/src/global.h (revision 4517) @@ -33,16 +33,4 @@ #include "vtroutestyle.h" -/* Make sure to catch usage of non-portable functions in debug mode */ -#ifndef NDEBUG -# undef strdup -# undef strndup -# undef snprintf -# undef round -# define strdup never_use_strdup__use_pcb_strdup -# define strndup never_use_strndup__use_pcb_strndup -# define snprintf never_use_snprintf__use_pcb_snprintf -# define round never_use_round__use_pcb_round -#endif - #endif /* PCB_GLOBAL_H */ Index: trunk/src/heap.c =================================================================== --- trunk/src/heap.c (revision 4516) +++ trunk/src/heap.c (revision 4517) @@ -29,9 +29,9 @@ */ -/* operations on heaps. - */ +/* operations on heaps. */ +#include #include #include "config.h" #include "heap.h"