On Sun, 17 Aug 2003, Geoffrey Young wrote:
> Randy Kobes wrote:
> > Hi,
> > In trying to compile the current cvs mod_perl 2 on Win32
> > (Apache/2.0.47), I've run into a problem with the use of
> > VOID in the definition of modperl_hook_run_mode_e in
> > src/modules/perl/modperl_types.h - being case insensitive,
> > I think Win32 is interpreting this as 'void', and gets
> > pretty confused. A s/VOID/MP_VOID/ gets around this, but
> > perhaps there's a more intuitive name?
> >
>
> bah - I _knew_ that would be a problem for somebody...
And it's usually Win32 :)
> I'd suggest renaming them all to MP_ or MP_HOOK_.
How about the following?
==========================================================
? d.diff
Index: mod_perl.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
retrieving revision 1.177
diff -u -r1.177 mod_perl.c
--- mod_perl.c 11 Aug 2003 20:34:22 -0000 1.177
+++ mod_perl.c 17 Aug 2003 20:08:42 -0000
@@ -660,7 +660,7 @@
char *level = NULL;
server_rec *s = (server_rec *)data;
- modperl_callback_process(MP_CHILD_EXIT_HANDLER, server_pool, s, VOID);
+ modperl_callback_process(MP_CHILD_EXIT_HANDLER, server_pool, s, MP_VOID);
if ((level = getenv("PERL_DESTRUCT_LEVEL"))) {
modperl_destruct_level = atoi(level);
@@ -849,7 +849,7 @@
modperl_response_init(r);
- retval = modperl_callback_per_dir(MP_RESPONSE_HANDLER, r, RUN_FIRST);
+ retval = modperl_callback_per_dir(MP_RESPONSE_HANDLER, r, MP_RUN_FIRST);
if ((retval == DECLINED) && r->content_type) {
r->handler = r->content_type; /* let http_core or whatever try */
Index: modperl_callback.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_callback.c,v
retrieving revision 1.55
diff -u -r1.55 modperl_callback.c
--- modperl_callback.c 11 Aug 2003 20:34:22 -0000 1.55
+++ modperl_callback.c 17 Aug 2003 20:08:42 -0000
@@ -190,11 +190,11 @@
MP_TRACE_h(MP_FUNC, "%s returned %d\n", handlers[i]->name, status);
/* follow Apache's lead and let OK terminate the phase for
- * RUN_FIRST handlers. RUN_ALL handlers keep going on OK.
- * VOID handler ignore all errors.
+ * MP_RUN_FIRST handlers. MP_RUN_ALL handlers keep going on OK.
+ * MP_VOID handler ignore all errors.
*/
- if (run_mode == RUN_ALL) {
+ if (run_mode == MP_RUN_ALL) {
/* the normal case:
* OK and DECLINED continue
* errors end the phase
@@ -211,7 +211,7 @@
break;
}
}
- else if (run_mode == RUN_FIRST) {
+ else if (run_mode == MP_RUN_FIRST) {
/* the exceptional case:
* OK and errors end the phase
* DECLINED continues
@@ -239,7 +239,7 @@
}
else {
/* the rare case.
- * VOID handlers completely ignore the return status
+ * MP_VOID handlers completely ignore the return status
* Apache should handle whatever mod_perl returns,
* so there is no need to mess with the status
*/
Index: modperl_config.c
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
retrieving revision 1.64
diff -u -r1.64 modperl_config.c
--- modperl_config.c 11 Aug 2003 20:34:22 -0000 1.64
+++ modperl_config.c 17 Aug 2003 20:08:43 -0000
@@ -290,7 +290,7 @@
rcfg->pnotes = Nullhv;
}
- retval = modperl_callback_per_dir(MP_CLEANUP_HANDLER, r, RUN_ALL);
+ retval = modperl_callback_per_dir(MP_CLEANUP_HANDLER, r, MP_RUN_ALL);
return retval;
}
Index: modperl_types.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_types.h,v
retrieving revision 1.68
diff -u -r1.68 modperl_types.h
--- modperl_types.h 11 Aug 2003 20:34:22 -0000 1.68
+++ modperl_types.h 17 Aug 2003 20:08:43 -0000
@@ -249,9 +249,9 @@
} modperl_module_cmd_data_t;
typedef enum {
- RUN_ALL,
- RUN_FIRST,
- VOID
+ MP_RUN_ALL,
+ MP_RUN_FIRST,
+ MP_VOID
} modperl_hook_run_mode_e;
#endif /* MODPERL_TYPES_H */
Index: modperl_util.h
===================================================================
RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_util.h,v
retrieving revision 1.43
diff -u -r1.43 modperl_util.h
--- modperl_util.h 11 Aug 2003 20:34:22 -0000 1.43
+++ modperl_util.h 17 Aug 2003 20:08:43 -0000
@@ -64,7 +64,7 @@
}
/* turn off cgi header parsing. in case we are already inside
- * modperl_callback_per_dir(MP_RESPONSE_HANDLER, r, RUN_FIRST);
+ * modperl_callback_per_dir(MP_RESPONSE_HANDLER, r, MP_RUN_FIRST);
* but haven't sent any data yet, it's too late to change
* MpReqPARSE_HEADERS, so change the wbucket's private flag directly
*/
======================================================================
--
best regards,
randy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]