Randy Kobes wrote:
Hi,
  On Win32, there's a problem in compiling modperl_cmd.c
under src/modules/perl/ with the current cvs about trying to
use a function with the wrong number of arguments (lines 311
and 317). I think this is due to how modperl_var_modify_t is
defined within mod_perl.h, specifically with the presence of
_stdcall within the definition of MP_FUNC_T in
modperl_common_util.h for Win32. This patch:
================================================================
Index: src/modules/perl/mod_perl.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
retrieving revision 1.70
diff -u -r1.70 mod_perl.h
--- src/modules/perl/mod_perl.h 20 Sep 2004 18:14:47 -0000      1.70
+++ src/modules/perl/mod_perl.h 1 Oct 2004 03:14:50 -0000
@@ -130,10 +130,10 @@

 #define MgTypeExt(mg) (mg->mg_type == '~')

-typedef void MP_FUNC_T(modperl_var_modify_t) (apr_table_t *,
-                                              apr_table_t *,
-                                              const char *,
-                                              const char *);
+typedef void (*modperl_var_modify_t) (apr_table_t *,
+                                      apr_table_t *,
+                                      const char *,
+                                      const char *);



 /* we need to hook a few internal things before APR_HOOK_REALLY_FIRST */
 #define MODPERL_HOOK_REALLY_REALLY_FIRST (-20)
====================================================================
allows things to build and the tests run (I'm getting a
couple of failures, but I'll look at those separately).


Is it possible that the right place to fix that is in modperl_common_util.h:

#ifdef WIN32
#   define MP_FUNC_T(name) (_stdcall *name)
/* XXX: not all functions get inlined
 * so its unclear what to and not to include in the .def files
 */
#   undef MP_INLINE
#   define MP_INLINE
#else
#   define MP_FUNC_T(name)          (*name)
#endif

as you can see there already a special case for WIN32. And it was added there for some reason. Do you know why? May be it's because of this nature of that specific function that you've a problem with? Should it stay intact for other uses?

I suppose that this is the change that broke things for you:
http://cvs.apache.org/viewcvs.cgi/modperl-2.0/src/modules/perl/modperl_cmd.c?r1=1.65&r2=1.66&diff_format=h

--
__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

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



Reply via email to