mturk       2005/02/15 03:40:00

  Modified:    jk/native/common jk_global.h
  Log:
  Use more accurate windows headers. No need to include GUI, thus
  use WIN32_LEAN_AND_MEAN.
  
  Revision  Changes    Path
  1.42      +34 -7     jakarta-tomcat-connectors/jk/native/common/jk_global.h
  
  Index: jk_global.h
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-connectors/jk/native/common/jk_global.h,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- jk_global.h       15 Feb 2005 09:21:42 -0000      1.41
  +++ jk_global.h       15 Feb 2005 11:40:00 -0000      1.42
  @@ -35,6 +35,11 @@
   
   #include "jk_version.h"
   
  +#ifdef HAVE_APR
  +#include "apr_lib.h"
  +#include "apr_strings.h"
  +#endif
  +
   #include <stdio.h>
   #include <stdlib.h>
   #include <string.h>
  @@ -47,11 +52,6 @@
   #include "ap_config.h"
   #endif
   
  -#ifdef HAVE_APR
  -#include "apr_lib.h"
  -#include "apr_strings.h"
  -#endif
  -
   #ifdef AS400
   #include "ap_config.h"
   extern char *strdup(const char *str);
  @@ -61,8 +61,35 @@
   #include <sys/stat.h>
   
   #ifdef WIN32
  -#include <windows.h>
  -#include <winsock.h>
  +#ifndef _WINDOWS_

  +#ifndef WIN32_LEAN_AND_MEAN

  +#define WIN32_LEAN_AND_MEAN

  +#endif

  +#ifndef _WIN32_WINNT

  +

  +/* Restrict the server to a subset of Windows NT 4.0 header files by default

  + */

  +#define _WIN32_WINNT 0x0400

  +#endif

  +#ifndef NOUSER

  +#define NOUSER

  +#endif

  +#ifndef NOMCX

  +#define NOMCX

  +#endif

  +#ifndef NOIME

  +#define NOIME

  +#endif

  +#include <windows.h>

  +/* 

  + * Add a _very_few_ declarations missing from the restricted set of headers

  + * (If this list becomes extensive, re-enable the required headers above!)

  + * winsock headers were excluded by WIN32_LEAN_AND_MEAN, so include them now

  + */

  +#include <winsock2.h>

  +#include <mswsock.h>

  +#include <ws2tcpip.h>
  +#endif
   #include <sys/timeb.h>
   #include <process.h>
   #else
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to