apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guenter Knauf <fua...@apache.org>
Subject problem compiling APR 0.9.x misc/win32/rand.c
Date Mon, 21 Jan 2008 21:52:58 GMT
Hi,
when I try to compile httpd 2.0.63 with MSCV6 then it breaks in apr/misc/win32/rand.c
because in wincrypt.h the needed stuff is surrounded with:
#if(_WIN32_WINNT >= 0x0400)
...
#endif

in apr/misc/win32/rand.c we include the system headers before our apr-own;
in apr/include/apr.h[w] I see:

#ifndef _WIN32_WINNT

/* Restrict the server to a subset of Windows NT 4.0 header files by default
 */
#define _WIN32_WINNT 0x0400
#endif

now when I move wincrypt.h after the apr header includes it works:

--- apr/misc/win32/rand.c.orig	Fri Jun 01 00:53:12 2007
+++ apr/misc/win32/rand.c	Mon Jan 21 22:21:18 2008
@@ -14,13 +14,12 @@
  * limitations under the License.
  */
 
-#include <windows.h>
-#include <wincrypt.h>
 #include "apr.h"
 #include "apr_private.h"
 #include "apr_general.h"
 #include "apr_portable.h"
 #include "apr_arch_misc.h"
+#include <wincrypt.h>
 
 
 APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf,

also seems that the windows.h include is not needed here.

Bill, can you please check if the above patch works with your setup?

thanks, Guen.



Mime
View raw message