https://issues.apache.org/bugzilla/show_bug.cgi?id=46416

           Summary: Include order in jk_global.h breaks mod_jk build on
                    Windows + Visual Studio 2005
           Product: Tomcat Connectors
           Version: 1.2.27
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: mod_jk
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: tim.whitting...@orionhealth.com


Building against the 1.2.27 tag, I've come across an issue with the order of
includes in jk_global.h that breaks the build using Visual Studio 2005.

Some recent changes to keepalive code started using the tcp_keepalive struct in
<mstcpip.h>, which is only included in jk_global.h if _WINDOWS_ is not already
defined - i.e. if <windows.h> has not already been included.

Unfortunately <windows.h> is included by APR (at least in the Apache 2.0 build
I have), and the APR headers are included before the #ifndef _WINDOWS_ block.
Switching the APR includes to below the #ifdef WIN32 block fixes the build.

It appears there's some fragility in the includes - it seems a bit odd that
mod_jk is sensitive to being the first to import <windows.h> - but I didn't
look hard enough at all the other defines/includes in there to say it could be
separated out entirely.

(On a side note, <windows.h> is included in jk_mt.h, which may not be
necessary).


-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to