httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Kobes <ra...@theoryx5.uwinnipeg.ca>
Subject [apreq-2] win32 workarounds
Date Sun, 04 May 2003 07:04:35 GMT
In building apreq-2 on Win32, there's a couple of things
that need some changing, nominally in src/apreq.h:

- functions declared with APR_INLINE don't get put into
libapreq.lib, but these are needed elsewhere,

- the definition of APREQ_DECLARE in src/apreq.h seems to need an
additional compile-time flag (perhaps someone knows?) in order to
compile on Win32 and link against the proper Apache library.

For the first problem, mod_perl 2, for example, doesn't use
APR_INLINE on Win32. I'm not sure about the 2nd problem ...
Would the following be OK, just to let things compile on
Win32, and then come back to this later?

============================================================
Index: apreq.h
===================================================================
RCS file: /home/cvspublic/httpd-apreq-2/src/apreq.h,v
retrieving revision 1.15
diff -u -r1.15 apreq.h
--- apreq.h	23 Apr 2003 06:48:57 -0000	1.15
+++ apreq.h	4 May 2003 06:56:42 -0000
@@ -8,12 +8,24 @@
  extern "C" {
 #endif 
 
-
+/* XXX temporary workaround for Win32 */
+#ifndef WIN32
 #define APREQ_DECLARE(d)                APR_DECLARE(d)
 #define APREQ_DECLARE_NONSTD(d)         APR_DECLARE_NONSTD(d)
+#else
+#define APREQ_DECLARE(d)                d
+#define APREQ_DECLARE_NONSTD(d)         d
+#endif
+
 #define APREQ_URL_ENCTYPE               "application/x-www-form-urlencoded"
 #define APREQ_MFD_ENCTYPE               "multipart/form-data"
 #define APREQ_XML_ENCTYPE               "application/xml"
+
+/* XXX WIN32 doesn't seem to put APR_INLINE fns into the lib */
+#ifdef WIN32
+#undef APR_INLINE
+#define APR_INLINE
+#endif
 
 #define APREQ_NELTS                     8
 
======================================================================

With this, the library builds, and the testall test can be
run (this presently fails 3 of the performance tests).

-- 
best regards,
randy


Mime
View raw message