From: <[EMAIL PROTECTED]>
Sent: Monday, January 29, 2001 2:15 PM
>
> Hey, all.  This fix also fixed a build problem I was having in Win98,
> but I'm worried that the fix might be skirting a bigger issue.  Code
> exists in apr_private.h that "turns off" the use of Windows' GDI
> library (by #define'ing NOGDI) among other things.  The recent
> inclusion of <aclapi.h>, on Win98 platforms, eventually results in
> <wtypes.h> being included, part of which depends on the GDI headers
> being available.  I do NOT expect this to happen on WinNT, but as I
> don't have an NT box here, I can't verify that.

Yuck.  I don't seem to have those interactions with vc5.0/SDK 2000.
But you are right, we just slowed the build by bypassing these
inclusions.

We can selectively toggle off -parts- of the GDI without turning it off
entirely.  Since I can't see which parts are used (we are looking at
different wtype.h versions) I can't help too much.

The patch ought to be reverted after we fix apr.hw to toggle off what
we can without toggling off anything more.  Does this sound like an
amusing project for you, Mike?

> Can someone provide some insight as to why APR explicitly attempts to
> bar inclusion of the GDI, USER, and 3 other classes of header files in
> apr_private.h?

Because it speeds up the build by 300%?  Seriously, if you are using APR to
develop an app that employs the excluded mechanisms, you must include the 
Windows.h before you include any apr_.h headers.  That is by design.

Before you consider the obvious (precompile through apr.h) consider that it
only works if every module agrees to include the headers, with no cruft,
in the same order.  Since we've agreed to disagree on this topic, and include
headers willy nilly in the sources, precompiled headers work for exactly one
source file and can't be applied any other file.

Bill

Reply via email to