Let --disable-debug actually do something

Medland, Bill Bill.Medland at accpac.com
Fri Dec 6 15:08:21 CST 2002


> -----Original Message-----
> From: Alexandre Julliard [mailto:julliard at winehq.com]
> Sent: Friday, December 06, 2002 12:53 PM
> To: Medland, Bill
> Cc: wine-devel at winehq.com
> Subject: Re: Let --disable-debug actually do something
> 
> 
> "Medland, Bill" <Bill.Medland at accpac.com> writes:
> 
> > --- wine/include/wine/debug.h	5 Jul 2002 21:22:09 
> -0000	1.5
> > +++ wine/include/wine/debug.h	4 Dec 2002 04:52:22 -0000
> > @@ -23,6 +23,7 @@
> >  
> >  #include <stdarg.h>
> >  #include "windef.h"
> > +#include "config.h"
> 
> You can't do that, installed includes shouldn't depend on config.h.

Oh.  So how is setting --disable-debug supposed to result in the FIXMES
being compiled out?  I just don't understand what is supposed to be
happening here; all I know is that it isn't working.  (Or is that not what
it is supposed to do?)

a) --disable-debug results in the settings in config.h changing.
b) wine/debug.h tests that setting that becomes defined in config.h, in
order to reduce FIXME to a basically null statement.
c) dlls/user/hook.c, for example, includes a FIXME statement.

neither hook.c nor debug.h include config.h so if I insert
    #ifndef NO_DEBUG_MSGS
    #error I was right
    #endif
just before the fixme of NotifyWinEvent
then it tells me I am right.

I can only think of two ways that setting --disable-debug could be expected
to result in the FIXMES being compiled out (which I presume is what is
supposed to happen).  Either it is supposed to result in a change to the
makefiles so the -D NO_DEBUG_MSGS gets specified (and I see no indication of
that) or else it results in a #define NO_DEBUG_MSGS at a suitable point that
comes before it is actually needed (which appears to be the intention).  So
I presume that the problem is that config.h is not being included before its
contents are needed.  So the question is where should it be included.  One
solution would be to include it explicitly in every file that includes a
WARN, FIXME or TRACE.  Do you really want that?  The other is to include it
in the file that uses it (viz. debug.h).

So tell me why I am an idiot and what solution you want me implement.  I
guess the simplest would be to drop --disable-debug from the configure.

> 
> -- 
> Alexandre Julliard
> julliard at winehq.com
> 
Bill Medland



More information about the wine-devel mailing list