Re: commit -- autoconf tidyness


Subject: Re: commit -- autoconf tidyness
From: Paul Rohr (paul@abisource.com)
Date: Fri Feb 16 2001 - 00:48:07 CST


At 10:24 PM 2/15/01 -0500, Dom Lachowicz wrote:
>>Reorder includes
>>
>> wv/exporter/wvexporter.c
>
>Bad Paul! No donut. All wv changes (no matter how simple) go through me, k?

Eeek. Sorry. How do you want them -- private patches or what?

Paul

PS: The reason I reordered them (in a fashion consistent with the rest of
wv) was to take advantage of the following nifty hack which should never be
checked in:

Index: wv.h
===================================================================
RCS file: /cvsroot/wv/wv.h,v
retrieving revision 1.75
diff -u -r1.75 wv.h
--- wv.h 2001/01/31 05:27:56 1.75
+++ wv.h 2001/02/16 06:33:37
@@ -7,6 +7,7 @@
 /* redefs of things that are either in glibc or we have to include them
ourselv
es*/
 #if defined(WIN32) && !defined(__MWERKS__)
 #define strcasecmp(s1,s2) stricmp(s1,s2)
+#include "ut_types.h" // for leak checking
 #else

This one-liner allows the expat library built by Makefile.abi to also use
the VC leak-hunting tools (which track down offending mallocs to the right
line) so that we can isolate leaks during AbiWord runs.

The relevant snippet of code from ut-types.h is here:

/*
        The MSVC debug runtime library can track leaks back to the
        original allocation via the following black magic.
*/
#if defined(_MSC_VER) && defined(_DEBUG) && defined(_CRTDBG_MAP_ALLOC)
#include <crtdbg.h>
#define UT_DEBUG_NEW new(_NORMAL_BLOCK, __FILE__, __LINE__)
#define new UT_DEBUG_NEW
#endif /* _MSC_VER && _DEBUG && _CRTDBG_MAP_ALLOC */
  
I doubt that even this snippet belongs in the real wv sources, but to get it
to work, the ordering of includes in the wv sources (wrt wv.h) is important.



This archive was generated by hypermail 2b25 : Fri Feb 16 2001 - 00:45:55 CST