Randy Kobes wrote:
> Issac Goldstand wrote:
>> Steve Hay wrote:
>>> Issac Goldstand wrote:
>>>> Vote results show only 2 +1s (issac,joes) and no -1s.
>>>>
>>>> We're still a +1 short of release.
>>>>
>>> Has anyone else tested on Win32 yet?
>>>
>>> I reported a build error which hasn't been addressed yet:
>>>
>>> http://marc.info/?l=apreq-dev&m=123244555902865&w=2
>>
>> I must've missed that. I'll try playing on win32 a bit, I guess...
>> I need to figure out where I'm gonna install a new set of compilers,
>> though, since my old win32 playground died on me a while back, so it
>> might take me some time.
>>
>
> After including the missing libapreq.rc from the svn sources, I get a
> build error:
>
> C:\svn\apreq\module\apache2\filter.c(421) : error C2152:
> 'initializing': pointers to functions with different attributes
> NMAKE : fatal error U1077: 'cl.exe' : return code '0x2'
> Stop.
>
> which comes from
> APR_REGISTER_OPTIONAL_FN(apreq_handle_apache2);
> in module/apache2/filter.c. This is on Win32, VC 6, and Apache/2.2.8.
I get a similar error with VC8 and Apache 2.2.10:
C:\Temp\LIBAPR~1.11\module\apache2\filter.c(420) : error C2440:
'initializing' : cannot convert from 'apreq_handle_t *(__stdcall
*)(request_rec *)' to 'apr_OFN_apreq_handle_apache2_t (__cdecl *)'
Not sure what it doesn't like about it. We have
__declspec(dllexport) apreq_handle_t * __stdcall
apreq_handle_apache2(request_rec *r);
and
typedef apreq_handle_t * (apr_OFN_apreq_handle_apache2_t) (request_rec
*r);
so why does it object to
apr_OFN_apreq_handle_apache2_t *apu__opt = apreq_handle_apache2;
?
Anyway, that's "fixed" by the following change to apache's
apr_optional.h:
--- apr_optional.h.orig 2007-01-15 12:00:58.000000000 +0000
+++ apr_optional.h 2009-02-06 10:57:28.387618600 +0000
@@ -68,7 +68,7 @@
* @param name The name of the function
*/
#define APR_REGISTER_OPTIONAL_FN(name) do { \
- APR_OPTIONAL_FN_TYPE(name) *apu__opt = name; \
+ APR_OPTIONAL_FN_TYPE(name) *apu__opt = (APR_OPTIONAL_FN_TYPE(name)
*)name; \
apr_dynamic_fn_register(#name,(apr_opt_fn_t *)apu__opt); \
} while (0)
End of Patch.
I don't know if that fix is at all correct, but with it, libapreq2 then
builds okay.
However, I then get a crash in module/t/request.t:
Unhandled exception at 0x00d536de in httpd.exe: 0xC0000005: Access
violation reading location 0xffffffff.
Call stack:
> 00d536de()
libhttpd.dll!ap_process_request_internal(request_rec *
r=0x00000000) Line 185 + 0x6 bytes C
libhttpd.dll!ap_process_request(request_rec * r=0x00d536d8)
Line 257 C
libhttpd.dll!ap_process_http_connection(conn_rec * c=0x00cd5550)
Line 190 + 0x6 bytes C
libhttpd.dll!ap_run_process_connection(conn_rec * c=0x00cd5550)
Line 43 + 0x28 bytes C
libhttpd.dll!ap_process_connection(conn_rec * c=0x00cd5550, void
* csd=0x00cce520) Line 178 + 0x6 bytes C
libhttpd.dll!worker_main(void * thread_num_val=0x00cd5548) Line
778 C
msvcr80.dll!781329bb()
[Frames below may be incorrect and/or missing, no symbols loaded
for msvcr80.dll]
perl510.dll!Perl_malloc(unsigned int nbytes=13206088) Line 1539
C