perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@hyperreal.org
Subject cvs commit: modperl/src/modules/perl apache_inc.h Apache.xs Constants.xs mod_perl.c mod_perl.h mod_perl_opmask.c perl_config.c perl_util.c
Date Tue, 21 Dec 1999 21:01:18 GMT
dougm       99/12/21 13:01:17

  Modified:    .        Changes MANIFEST
               src/modules/perl Apache.xs Constants.xs mod_perl.c
                        mod_perl.h mod_perl_opmask.c perl_config.c
                        perl_util.c
  Added:       .        INSTALL.activeperl
               src/modules/perl apache_inc.h
  Log:
  ActivePerl compile patches [Jochen Wiedmann <joe@ispsoft.de>]
  
  Revision  Changes    Path
  1.365     +2 -0      modperl/Changes
  
  Index: Changes
  ===================================================================
  RCS file: /home/cvs/modperl/Changes,v
  retrieving revision 1.364
  retrieving revision 1.365
  diff -u -r1.364 -r1.365
  --- Changes	1999/12/21 19:16:31	1.364
  +++ Changes	1999/12/21 21:00:53	1.365
  @@ -10,6 +10,8 @@
   
   =item 1.21_01-dev
   
  +ActivePerl compile patches [Jochen Wiedmann <joe@ispsoft.de>]
  +
   document that Apache 1.2.x is no longer supported
   
   Apache::src now supported with USE_APXS=1
  
  
  
  1.59      +2 -0      modperl/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/modperl/MANIFEST,v
  retrieving revision 1.58
  retrieving revision 1.59
  diff -u -r1.58 -r1.59
  --- MANIFEST	1999/12/09 06:28:53	1.58
  +++ MANIFEST	1999/12/21 21:00:59	1.59
  @@ -20,6 +20,7 @@
   INSTALL.apaci
   SUPPORT
   INSTALL.win32
  +INSTALL.activeperl
   MANIFEST
   ToDo
   Makefile.PL
  @@ -73,6 +74,7 @@
   Leak/Leak.xs
   Leak/Makefile.PL
   Leak/typemap
  +src/modules/perl/apache_inc.h
   src/modules/perl/perl_PL.h
   src/modules/perl/Exports.c
   src/modules/perl/File.xs
  
  
  
  1.1                  modperl/INSTALL.activeperl
  
  Index: INSTALL.activeperl
  ===================================================================
  
  How I installed mod_perl [Jochen Wiedmann <joe@ispsoft.de>]
  ========================
  
  1.)  Installed Activeperl (APi519) in C:\Perl
  
  2.)  Installed Apache in C:\Apache
  
  3.)  Compiled Apache:
  
  	cd C:\Apache\src
  	nmake /f Makefile_win32.txt INSTDIR="C:\Apache" _apache
  
  4.)  Extracted mod_perl 1.21 into C:\src. That means I had
       a directory c:\src\mod_perl-1.21 with files Makefile.PL, ...
  
  5.)  Compiled the Perl part of mod_perl with
  
  	cd C:\src\mod_perl-1.21
  	perl Makefile.PL
  	nmake
  
       (As I am using Windows 95, I had to apply patches to the
       ExtUtils::MM_Unix and Config modules. Patches sent to
       perl-win32-porters and makemaker mailing lists.)
  
  6.)  Opened
       c:\src\mod_perl-1.21\src\modules\ApacheModulePerl\ApacheModulePerl.dsw
       with Visual C++ 5.0.
  
  7.)  Removed perl.lib and ApacheCore.lib from the list of files.
  
  8.)  Added c:\perl\lib\core\perlcore.lib and c:\apache\src\corer\apachecore.lib
       to the list of files (Project/Add Files)
  
  9.)  Added c:\perl\lib\core and C:\apache\src\include to the list of
       include directories (Project/Settings/C++/Preprocessor)
  
  10.) Added the following preprocessor symbols (Project/Settings/C++/
       Preprocessor):
  
         -DNDEBUG,_CONSOLE,NO_STRICT,HAVE_DES_FCRYPT,PERL_OBJECT
  
       These are mainly those symbols, that I have seen when compiling the
       Perl part.
  
  11.) Renamed c:\src\mod_perl-1.21\src\modules\perl\dirent.h to dirent.h.orig.
  
  
  
  
  1.82      +19 -9     modperl/src/modules/perl/Apache.xs
  
  Index: Apache.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Apache.xs,v
  retrieving revision 1.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Apache.xs	1999/11/03 20:12:50	1.81
  +++ Apache.xs	1999/12/21 21:01:06	1.82
  @@ -242,16 +242,16 @@
   
   static char *custom_response(request_rec *r, int status, char *string)
   {
  -    core_dir_config *conf = 
  +    core_dir_config *conf = (core_dir_config *)
   	get_module_config(r->per_dir_config, &core_module);
       int idx;
       char *retval = NULL;
   
       if(conf->response_code_strings == NULL) {
  -        conf->response_code_strings = 
  -	    pcalloc(r->pool,
  -		    sizeof(*conf->response_code_strings) * 
  -		    RESPONSE_CODES);
  +        conf->response_code_strings = (char **)
  +	  pcalloc(r->pool,
  +		  sizeof(*conf->response_code_strings) * 
  +		  RESPONSE_CODES);
       }
   
       idx = index_of_response(status);
  @@ -841,7 +841,9 @@
       send_http_header(r);
       mod_perl_sent_header(r, 1);
       r->status = 200; /* XXX, why??? */
  - 
  +
  +#ifndef PERL_OBJECT
  +
   int
   send_fd(r, f, length=-1)
       Apache	r
  @@ -854,6 +856,8 @@
       OUTPUT:
       RETVAL
   
  +#endif
  +
   int
   rflush(r)
       Apache     r
  @@ -956,7 +960,11 @@
   	CV *cv = GvCV(gv_fetchpv("Apache::write_client", FALSE, SVt_PVCV));
   	hard_timeout("mod_perl: Apache->print", r);
   	PUSHMARK(mark);
  +#ifdef PERL_OBJECT
  +	(void)(*CvXSUB(cv))(cv, pPerl); /* &Apache::write_client; */
  +#else
   	(void)(*CvXSUB(cv))(cv); /* &Apache::write_client; */
  +#endif
   
   	if(IoFLAGS(GvIOp(defoutgv)) & IOf_FLUSH) /* if $| != 0; */
   #if MODULE_MAGIC_NUMBER >= 19970103
  @@ -1637,7 +1645,7 @@
       if(k) {
   	key = SvPV(k,len);
       }
  -    cfg = get_module_config(r->request_config, &perl_module);
  +    cfg = (perl_request_config*) get_module_config(r->request_config, &perl_module);
       if(!cfg->pnotes) cfg->pnotes = newHV();
       if(key) {
   	if(hv_exists(cfg->pnotes, key, len)) {
  @@ -1836,14 +1844,16 @@
   
       CODE:
       if(r && r->per_dir_config) {				   
  -	c = get_module_config(r->per_dir_config, &perl_module);
  +	c = (perl_dir_config *)get_module_config(r->per_dir_config, 
  +						 &perl_module);
   	TABLE_GET_SET(c->vars, FALSE);
       }
       if (!SvTRUE(RETVAL)) {
   	s = r ? r->server : perl_get_startup_server();
   	if (s && s->module_config) {
   	    SvREFCNT_dec(RETVAL); /* in case above did newSV(0) */
  -	    cs = get_module_config(s->module_config, &perl_module);
  +	    cs = (perl_server_config *)get_module_config(s->module_config, 
  +							 &perl_module);
   	    TABLE_GET_SET(cs->vars, FALSE);
   	}
   	else XSRETURN_UNDEF;
  
  
  
  1.18      +2 -3      modperl/src/modules/perl/Constants.xs
  
  Index: Constants.xs
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/Constants.xs,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- Constants.xs	1999/09/03 01:49:54	1.17
  +++ Constants.xs	1999/12/21 21:01:07	1.18
  @@ -134,12 +134,11 @@
       if (strEQ(name, "TAKE3"))
   	return TAKE3;
       
  -    return -1;
  +    return (enum cmd_how) -1;
   }
   
   static double
  -constant(name)
  -char *name;
  +constant(char *name)
   {
       errno = 0;
       switch (*name) {
  
  
  
  1.93      +29 -27    modperl/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v
  retrieving revision 1.92
  retrieving revision 1.93
  diff -u -r1.92 -r1.93
  --- mod_perl.c	1999/12/09 05:32:26	1.92
  +++ mod_perl.c	1999/12/21 21:01:08	1.93
  @@ -82,54 +82,56 @@
   CPerlObj *pPerl;
   #endif
   
  +typedef const char* (*crft)(); /* command_req_func_t */
  +
   static command_rec perl_cmds[] = {
   #ifdef PERL_SECTIONS
  -    { "<Perl>", perl_section, NULL, SECTION_ALLOWED, RAW_ARGS, "Perl code" },
  -    { "</Perl>", perl_end_section, NULL, SECTION_ALLOWED, NO_ARGS, "End Perl code"
},
  +    { "<Perl>", (crft) perl_section, NULL, SECTION_ALLOWED, RAW_ARGS, "Perl code"
},
  +    { "</Perl>", (crft) perl_end_section, NULL, SECTION_ALLOWED, NO_ARGS, "End Perl
code" },
   #endif
  -    { "=pod", perl_pod_section, NULL, OR_ALL, RAW_ARGS, "Start of POD" },
  -    { "=back", perl_pod_section, NULL, OR_ALL, RAW_ARGS, "End of =over" },
  -    { "=cut", perl_pod_end_section, NULL, OR_ALL, NO_ARGS, "End of POD" },
  -    { "__END__", perl_config_END, NULL, OR_ALL, RAW_ARGS, "Stop reading config" },
  -    { "PerlFreshRestart", perl_cmd_fresh_restart,
  +    { "=pod", (crft) perl_pod_section, NULL, OR_ALL, RAW_ARGS, "Start of POD" },
  +    { "=back", (crft) perl_pod_section, NULL, OR_ALL, RAW_ARGS, "End of =over" },
  +    { "=cut", (crft) perl_pod_end_section, NULL, OR_ALL, NO_ARGS, "End of POD" },
  +    { "__END__", (crft) perl_config_END, NULL, OR_ALL, RAW_ARGS, "Stop reading config"
},
  +    { "PerlFreshRestart", (crft) perl_cmd_fresh_restart,
         NULL,
         RSRC_CONF, FLAG, "Tell mod_perl to reload modules and flush Apache::Registry cache
on restart" },
  -    { "PerlTaintCheck", perl_cmd_tainting,
  +    { "PerlTaintCheck", (crft) perl_cmd_tainting,
         NULL,
         RSRC_CONF, FLAG, "Turn on -T switch" },
   #ifdef PERL_SAFE_STARTUP
  -    { "PerlOpmask", perl_cmd_opmask,
  +    { "PerlOpmask", (crft) perl_cmd_opmask,
         NULL,
         RSRC_CONF, TAKE1, "Opmask File" },
   #endif
  -    { "PerlWarn", perl_cmd_warn,
  +    { "PerlWarn", (crft) perl_cmd_warn,
         NULL,
         RSRC_CONF, FLAG, "Turn on -w switch" },
  -    { "PerlScript", perl_cmd_require,
  +    { "PerlScript", (crft) perl_cmd_require,
         NULL,
         OR_ALL, ITERATE, "this directive is deprecated, use `PerlRequire'" },
  -    { "PerlRequire", perl_cmd_require,
  +    { "PerlRequire", (crft) perl_cmd_require,
         NULL,
         OR_ALL, ITERATE, "A Perl script name, pulled in via require" },
  -    { "PerlModule", perl_cmd_module,
  +    { "PerlModule", (crft) perl_cmd_module,
         NULL,
         OR_ALL, ITERATE, "List of Perl modules" },
  -    { "PerlSetVar", perl_cmd_var,
  +    { "PerlSetVar", (crft) perl_cmd_var,
         NULL,
         OR_ALL, TAKE2, "Perl config var and value" },
  -    { "PerlSetEnv", perl_cmd_setenv,
  +    { "PerlSetEnv", (crft) perl_cmd_setenv,
         NULL,
         OR_ALL, TAKE2, "Perl %ENV key and value" },
  -    { "PerlPassEnv", perl_cmd_pass_env, 
  +    { "PerlPassEnv", (crft) perl_cmd_pass_env, 
         NULL,
         RSRC_CONF, ITERATE, "pass environment variables to %ENV"},  
  -    { "PerlSendHeader", perl_cmd_sendheader,
  +    { "PerlSendHeader", (crft) perl_cmd_sendheader,
         NULL,
         OR_ALL, FLAG, "Tell mod_perl to parse and send HTTP headers" },
  -    { "PerlSetupEnv", perl_cmd_env,
  +    { "PerlSetupEnv", (crft) perl_cmd_env,
         NULL,
         OR_ALL, FLAG, "Tell mod_perl to setup %ENV by default" },
  -    { "PerlHandler", perl_cmd_handler_handlers,
  +    { "PerlHandler", (crft) perl_cmd_handler_handlers,
         NULL,
         OR_ALL, ITERATE, "the Perl handler routine name" },
   #ifdef PERL_TRANS
  @@ -509,7 +511,7 @@
   void perl_startup (server_rec *s, pool *p)
   {
       char *argv[] = { NULL, NULL, NULL, NULL, NULL, NULL, NULL };
  -    char **list, *dstr;
  +    char **entries, *dstr;
       int status, i, argc=1;
       dPSRV(s);
       SV *pool_rv, *server_rv;
  @@ -697,20 +699,20 @@
       ENTER_SAFE(s,p);
       MP_TRACE_g(mod_perl_dump_opmask());
   
  -    list = (char **)cls->PerlRequire->elts;
  +    entries = (char **)cls->PerlRequire->elts;
       for(i = 0; i < cls->PerlRequire->nelts; i++) {
  -	if(perl_load_startup_script(s, p, list[i], TRUE) != OK) {
  +	if(perl_load_startup_script(s, p, entries[i], TRUE) != OK) {
   	    fprintf(stderr, "Require of Perl file `%s' failed, exiting...\n", 
  -		    list[i]);
  +		    entries[i]);
   	    exit(1);
   	}
       }
   
  -    list = (char **)cls->PerlModule->elts;
  +    entries = (char **)cls->PerlModule->elts;
       for(i = 0; i < cls->PerlModule->nelts; i++) {
  -	if(perl_require_module(list[i], s) != OK) {
  +	if(perl_require_module(entries[i], s) != OK) {
   	    fprintf(stderr, "Can't load Perl module `%s', exiting...\n", 
  -		    list[i]);
  +		    entries[i]);
   	    exit(1);
   	}
       }
  @@ -1335,7 +1337,7 @@
       char *dispatcher = NULL;
   
       if(r->per_dir_config)
  -	cld = get_module_config(r->per_dir_config, &perl_module);
  +	cld = (perl_dir_config *) get_module_config(r->per_dir_config, &perl_module);
   
   #ifdef PERL_DISPATCH
       if(cld && (dispatcher = cld->PerlDispatchHandler)) {
  
  
  
  1.88      +37 -62    modperl/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v
  retrieving revision 1.87
  retrieving revision 1.88
  diff -u -r1.87 -r1.88
  --- mod_perl.h	1999/09/02 20:19:25	1.87
  +++ mod_perl.h	1999/12/21 21:01:09	1.88
  @@ -1,8 +1,19 @@
   #ifdef WIN32
   #define NO_PERL_CHILD_INIT
   #define NO_PERL_CHILD_EXIT
  +#ifdef JW_PERL_OBJECT
  +#include <winsock2.h>
  +#include <malloc.h>
  +#include <win32.h>
  +#include <win32iop.h>
  +#include <fcntl.h>		// For O_BINARY
  +#include "EXTERN.h"
  +#include "perl.h"
  +#include <iperlsys.h>
  +#else
   #include "dirent.h"
   #endif
  +#endif
   
   #ifndef IS_MODULE
   #define IS_MODULE
  @@ -16,26 +27,8 @@
   #endif
   
   #ifdef _INCLUDE_APACHE_FIRST
  -#include "httpd.h" 
  -#include "http_config.h" 
  -#include "http_protocol.h" 
  -#include "http_log.h" 
  -#include "http_main.h" 
  -#include "http_core.h" 
  -#include "http_request.h" 
  -#include "util_script.h" 
  -#include "http_conf_globals.h"
  -#if defined(APACHE_SSL) || defined(MOD_SSL)
  -#undef _
  -#ifdef _config_h_
  -#ifdef CAN_PROTOTYPE
  -#define _(args) args
  -#else
  -#define _(args) ()
  +#include "apache_inc.h"
   #endif
  -#endif
  -#endif
  -#endif
   
   #include "EXTERN.h"
   #include "perl.h"
  @@ -108,32 +101,9 @@
   #undef __attribute__
   
   #ifndef _INCLUDE_APACHE_FIRST
  -#ifdef __cplusplus
  -extern "C" {
  -#endif
  -#include "httpd.h" 
  -#include "http_config.h" 
  -#include "http_protocol.h" 
  -#include "http_log.h" 
  -#include "http_main.h" 
  -#include "http_core.h" 
  -#include "http_request.h" 
  -#include "util_script.h" 
  -#include "http_conf_globals.h"
  -#if defined(APACHE_SSL) || defined(MOD_SSL)
  -#undef _
  -#ifdef _config_h_
  -#ifdef CAN_PROTOTYPE
  -#define _(args) args
  -#else
  -#define _(args) ()
  -#endif
  -#endif
  -#endif
  -#ifdef __cplusplus
  -}
  +#include "apache_inc.h"
   #endif
  -#endif
  +
   
   #ifndef dTHR
   #define dTHR extern int errno
  @@ -348,13 +318,13 @@
   int status = dstatus
   
   #define dPPREQ \
  -   perl_request_config *cfg = get_module_config(r->request_config, &perl_module)
  +   perl_request_config *cfg = (perl_request_config *)get_module_config(r->request_config,
&perl_module)
   
   #define dPPDIR \
  -   perl_dir_config *cld = get_module_config(r->per_dir_config, &perl_module)   
  +   perl_dir_config *cld = (perl_dir_config *)get_module_config(r->per_dir_config, &perl_module)
  
   
   #define dPSRV(srv) \
  -   perl_server_config *cls = get_module_config (srv->module_config, &perl_module)
  +   perl_server_config *cls = (perl_server_config *) get_module_config (srv->module_config,
&perl_module)
   
   /* per-directory flags */
   
  @@ -717,7 +687,7 @@
   #define PERL_DISPATCH_HOOK perl_dispatch
   
   #define PERL_DISPATCH_CMD_ENTRY \
  -"PerlDispatchHandler", perl_cmd_dispatch_handlers, \
  +"PerlDispatchHandler", (crft) perl_cmd_dispatch_handlers, \
       NULL, \
       OR_ALL, TAKE1, "the Perl Dispatch handler routine name"
   
  @@ -734,7 +704,7 @@
   #define PERL_CHILD_INIT_HOOK perl_child_init
   
   #define PERL_CHILD_INIT_CMD_ENTRY \
  -"PerlChildInitHandler", perl_cmd_child_init_handlers, \
  +"PerlChildInitHandler", (crft) perl_cmd_child_init_handlers, \
       NULL,	 \
       RSRC_CONF, PERL_TAKE, "the Perl Child init handler routine name"  
   
  @@ -751,7 +721,7 @@
   #define PERL_CHILD_EXIT_HOOK perl_child_exit
   
   #define PERL_CHILD_EXIT_CMD_ENTRY \
  -"PerlChildExitHandler", perl_cmd_child_exit_handlers, \
  +"PerlChildExitHandler", (crft) perl_cmd_child_exit_handlers, \
       NULL,	 \
       RSRC_CONF, PERL_TAKE, "the Perl Child exit handler routine name"  
   
  @@ -766,7 +736,7 @@
   #define PERL_RESTART
   
   #define PERL_RESTART_CMD_ENTRY \
  -"PerlRestartHandler", perl_cmd_restart_handlers, \
  +"PerlRestartHandler", (crft) perl_cmd_restart_handlers, \
       NULL,	 \
       RSRC_CONF, PERL_TAKE, "the Perl Restart handler routine name"  
   
  @@ -789,7 +759,7 @@
   #define PERL_POST_READ_REQUEST_HOOK perl_post_read_request
   
   #define PERL_POST_READ_REQUEST_CMD_ENTRY \
  -"PerlPostReadRequestHandler", perl_cmd_post_read_request_handlers, \
  +"PerlPostReadRequestHandler", (crft) perl_cmd_post_read_request_handlers, \
       NULL, \
       RSRC_CONF, PERL_TAKE, "the Perl Post Read Request handler routine name" 
   
  @@ -806,7 +776,7 @@
   #define PERL_TRANS_HOOK perl_translate
   
   #define PERL_TRANS_CMD_ENTRY \
  -"PerlTransHandler", perl_cmd_trans_handlers, \
  +"PerlTransHandler", (crft) perl_cmd_trans_handlers, \
       NULL,	 \
       RSRC_CONF, PERL_TAKE, "the Perl Translation handler routine name"  
   
  @@ -824,7 +794,7 @@
   #define PERL_AUTHEN_HOOK perl_authenticate
   
   #define PERL_AUTHEN_CMD_ENTRY \
  -"PerlAuthenHandler", perl_cmd_authen_handlers, \
  +"PerlAuthenHandler", (crft) perl_cmd_authen_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Authentication handler routine name"
   
  @@ -841,7 +811,7 @@
   #define PERL_AUTHZ_HOOK perl_authorize
   
   #define PERL_AUTHZ_CMD_ENTRY \
  -"PerlAuthzHandler", perl_cmd_authz_handlers, \
  +"PerlAuthzHandler", (crft) perl_cmd_authz_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Authorization handler routine name" 
   #define PERL_AUTHZ_CREATE(s) s->PerlAuthzHandler = PERL_CMD_INIT
  @@ -857,7 +827,7 @@
   #define PERL_ACCESS_HOOK perl_access
   
   #define PERL_ACCESS_CMD_ENTRY \
  -"PerlAccessHandler", perl_cmd_access_handlers, \
  +"PerlAccessHandler", (crft) perl_cmd_access_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Access handler routine name" 
   
  @@ -876,7 +846,7 @@
   #define PERL_TYPE_HOOK perl_type_checker
   
   #define PERL_TYPE_CMD_ENTRY \
  -"PerlTypeHandler", perl_cmd_type_handlers, \
  +"PerlTypeHandler", (crft) perl_cmd_type_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Type check handler routine name" 
   
  @@ -893,7 +863,7 @@
   #define PERL_FIXUP_HOOK perl_fixup
   
   #define PERL_FIXUP_CMD_ENTRY \
  -"PerlFixupHandler", perl_cmd_fixup_handlers, \
  +"PerlFixupHandler", (crft) perl_cmd_fixup_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Fixup handler routine name" 
   
  @@ -910,7 +880,7 @@
   #define PERL_LOG_HOOK perl_logger
   
   #define PERL_LOG_CMD_ENTRY \
  -"PerlLogHandler", perl_cmd_log_handlers, \
  +"PerlLogHandler", (crft) perl_cmd_log_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Log handler routine name" 
   
  @@ -927,7 +897,7 @@
   #define PERL_CLEANUP_HOOK perl_cleanup
   
   #define PERL_CLEANUP_CMD_ENTRY \
  -"PerlCleanupHandler", perl_cmd_cleanup_handlers, \
  +"PerlCleanupHandler", (crft) perl_cmd_cleanup_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Cleanup handler routine name" 
   
  @@ -944,7 +914,7 @@
   #define PERL_INIT_HOOK perl_init
   
   #define PERL_INIT_CMD_ENTRY \
  -"PerlInitHandler", perl_cmd_init_handlers, \
  +"PerlInitHandler", (crft) perl_cmd_init_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Init handler routine name" 
   
  @@ -961,7 +931,7 @@
   #define PERL_HEADER_PARSER_HOOK perl_header_parser
   
   #define PERL_HEADER_PARSER_CMD_ENTRY \
  -"PerlHeaderParserHandler", perl_cmd_header_parser_handlers, \
  +"PerlHeaderParserHandler", (crft) perl_cmd_header_parser_handlers, \
       NULL, \
       OR_ALL, PERL_TAKE, "the Perl Header Parser handler routine name" 
   
  @@ -1255,4 +1225,9 @@
   #else
   #define ENTER_SAFE(s,p)
   #define LEAVE_SAFE
  +#endif
  +
  +#ifdef JW_PERL_OBJECT
  +#undef stderr
  +#define stderr PerlIO_stderr()
   #endif
  
  
  
  1.6       +3 -0      modperl/src/modules/perl/mod_perl_opmask.c
  
  Index: mod_perl_opmask.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/mod_perl_opmask.c,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- mod_perl_opmask.c	1999/03/26 22:20:36	1.5
  +++ mod_perl_opmask.c	1999/12/21 21:01:10	1.6
  @@ -236,5 +236,8 @@
   char *mod_perl_set_opmask(request_rec *r, SV *sv)
   {
       croak("Can't override Opmask");
  +	return NULL; /* C++ emits an error message otherwise
  +				  * because of a missing return value.
  +				  */
   }
   #endif /*PERL_SAFE_STARTUP*/
  
  
  
  1.80      +71 -71    modperl/src/modules/perl/perl_config.c
  
  Index: perl_config.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v
  retrieving revision 1.79
  retrieving revision 1.80
  diff -u -r1.79 -r1.80
  --- perl_config.c	1999/09/09 11:04:47	1.79
  +++ perl_config.c	1999/12/21 21:01:10	1.80
  @@ -157,7 +157,7 @@
   
       return conf->auth_name;
   #else
  -    return auth_name(r);
  +    return (char *) auth_name(r);
   #endif
   }
   
  @@ -203,82 +203,82 @@
   
   void *perl_merge_dir_config (pool *p, void *basev, void *addv)
   {
  -    perl_dir_config *new = (perl_dir_config *)pcalloc (p, sizeof(perl_dir_config));
  +    perl_dir_config *mrg = (perl_dir_config *)pcalloc (p, sizeof(perl_dir_config));
       perl_dir_config *base = (perl_dir_config *)basev;
       perl_dir_config *add = (perl_dir_config *)addv;
   
       array_header *vars = (array_header *)base->vars;
   
  -    new->location = add->location ? 
  +    mrg->location = add->location ? 
           add->location : base->location;
   
       /* XXX: what triggers such a condition ?*/
       if(vars && (vars->nelts > 100000)) {
   	fprintf(stderr, "[warning] PerlSetVar->nelts = %d\n", vars->nelts);
       }
  -    new->vars = overlay_tables(p, add->vars, base->vars);
  -    new->env = overlay_tables(p, add->env, base->env);
  +    mrg->vars = overlay_tables(p, add->vars, base->vars);
  +    mrg->env = overlay_tables(p, add->env, base->env);
   
  -    new->SendHeader = (add->SendHeader != MPf_None) ?
  +    mrg->SendHeader = (add->SendHeader != MPf_None) ?
   	add->SendHeader : base->SendHeader;
   
  -    new->SetupEnv = (add->SetupEnv != MPf_None) ?
  +    mrg->SetupEnv = (add->SetupEnv != MPf_None) ?
   	add->SetupEnv : base->SetupEnv;
   
       /* merge flags */
  -    MP_FMERGE(new,add,base,MPf_INCPUSH);
  -    MP_FMERGE(new,add,base,MPf_HASENV);
  -    /*MP_FMERGE(new,add,base,MPf_ENV);*/
  -    /*MP_FMERGE(new,add,base,MPf_SENDHDR);*/
  -    MP_FMERGE(new,add,base,MPf_SENTHDR);
  -    MP_FMERGE(new,add,base,MPf_CLEANUP);
  -    MP_FMERGE(new,add,base,MPf_RCLEANUP);
  +    MP_FMERGE(mrg,add,base,MPf_INCPUSH);
  +    MP_FMERGE(mrg,add,base,MPf_HASENV);
  +    /*MP_FMERGE(mrg,add,base,MPf_ENV);*/
  +    /*MP_FMERGE(mrg,add,base,MPf_SENDHDR);*/
  +    MP_FMERGE(mrg,add,base,MPf_SENTHDR);
  +    MP_FMERGE(mrg,add,base,MPf_CLEANUP);
  +    MP_FMERGE(mrg,add,base,MPf_RCLEANUP);
   
   #ifdef PERL_DISPATCH
  -    new->PerlDispatchHandler = add->PerlDispatchHandler ? 
  +    mrg->PerlDispatchHandler = add->PerlDispatchHandler ? 
           add->PerlDispatchHandler : base->PerlDispatchHandler;
   #endif
   #ifdef PERL_INIT
  -    new->PerlInitHandler = add->PerlInitHandler ? 
  +    mrg->PerlInitHandler = add->PerlInitHandler ? 
           add->PerlInitHandler : base->PerlInitHandler;
   #endif
   #ifdef PERL_HEADER_PARSER
  -    new->PerlHeaderParserHandler = add->PerlHeaderParserHandler ? 
  +    mrg->PerlHeaderParserHandler = add->PerlHeaderParserHandler ? 
           add->PerlHeaderParserHandler : base->PerlHeaderParserHandler;
   #endif
   #ifdef PERL_ACCESS
  -    new->PerlAccessHandler = add->PerlAccessHandler ? 
  +    mrg->PerlAccessHandler = add->PerlAccessHandler ? 
           add->PerlAccessHandler : base->PerlAccessHandler;
   #endif
   #ifdef PERL_AUTHEN
  -    new->PerlAuthenHandler = add->PerlAuthenHandler ? 
  +    mrg->PerlAuthenHandler = add->PerlAuthenHandler ? 
           add->PerlAuthenHandler : base->PerlAuthenHandler;
   #endif
   #ifdef PERL_AUTHZ
  -    new->PerlAuthzHandler = add->PerlAuthzHandler ? 
  +    mrg->PerlAuthzHandler = add->PerlAuthzHandler ? 
           add->PerlAuthzHandler : base->PerlAuthzHandler;
   #endif
   #ifdef PERL_TYPE
  -    new->PerlTypeHandler = add->PerlTypeHandler ? 
  +    mrg->PerlTypeHandler = add->PerlTypeHandler ? 
           add->PerlTypeHandler : base->PerlTypeHandler;
   #endif
   #ifdef PERL_FIXUP
  -    new->PerlFixupHandler = add->PerlFixupHandler ? 
  +    mrg->PerlFixupHandler = add->PerlFixupHandler ? 
           add->PerlFixupHandler : base->PerlFixupHandler;
   #endif
   #if 1
  -    new->PerlHandler = add->PerlHandler ? add->PerlHandler : base->PerlHandler;
  +    mrg->PerlHandler = add->PerlHandler ? add->PerlHandler : base->PerlHandler;
   #endif
   #ifdef PERL_LOG
  -    new->PerlLogHandler = add->PerlLogHandler ? 
  +    mrg->PerlLogHandler = add->PerlLogHandler ? 
           add->PerlLogHandler : base->PerlLogHandler;
   #endif
   #ifdef PERL_CLEANUP
  -    new->PerlCleanupHandler = add->PerlCleanupHandler ? 
  +    mrg->PerlCleanupHandler = add->PerlCleanupHandler ? 
           add->PerlCleanupHandler : base->PerlCleanupHandler;
   #endif
   
  -    return new;
  +    return mrg;
   }
   
   void *perl_create_dir_config (pool *p, char *dirname)
  @@ -308,53 +308,53 @@
   
   void *perl_merge_server_config (pool *p, void *basev, void *addv)
   {
  -    perl_server_config *new = (perl_server_config *)pcalloc (p, sizeof(perl_server_config));
  +    perl_server_config *mrg = (perl_server_config *)pcalloc (p, sizeof(perl_server_config));
       perl_server_config *base = (perl_server_config *)basev;
       perl_server_config *add = (perl_server_config *)addv;
   
  -    new->PerlPassEnv = append_arrays(p, add->PerlPassEnv, base->PerlPassEnv);
  +    mrg->PerlPassEnv = append_arrays(p, add->PerlPassEnv, base->PerlPassEnv);
   #if 0
       /* We don't merge these because they're inlined */
  -    new->PerlModule = append_arrays(p, add->PerlModule, base->PerlModule);
  -    new->PerlRequire = append_arrays(p, add->PerlRequire, base->PerlRequire);
  +    mrg->PerlModule = append_arrays(p, add->PerlModule, base->PerlModule);
  +    mrg->PerlRequire = append_arrays(p, add->PerlRequire, base->PerlRequire);
   #endif
   
  -    new->PerlTaintCheck = add->PerlTaintCheck ?
  +    mrg->PerlTaintCheck = add->PerlTaintCheck ?
           add->PerlTaintCheck : base->PerlTaintCheck;
  -    new->PerlWarn = add->PerlWarn ?
  +    mrg->PerlWarn = add->PerlWarn ?
           add->PerlWarn : base->PerlWarn;
  -    new->FreshRestart = add->FreshRestart ?
  +    mrg->FreshRestart = add->FreshRestart ?
           add->FreshRestart : base->FreshRestart;
  -    new->PerlOpmask = add->PerlOpmask ?
  +    mrg->PerlOpmask = add->PerlOpmask ?
           add->PerlOpmask : base->PerlOpmask;
  -    new->vars = overlay_tables(p, add->vars, base->vars);
  +    mrg->vars = overlay_tables(p, add->vars, base->vars);
   
   #ifdef PERL_POST_READ_REQUEST
  -    new->PerlPostReadRequestHandler = add->PerlPostReadRequestHandler ?
  +    mrg->PerlPostReadRequestHandler = add->PerlPostReadRequestHandler ?
           add->PerlPostReadRequestHandler : base->PerlPostReadRequestHandler;
   #endif
   #ifdef PERL_TRANS
  -    new->PerlTransHandler = add->PerlTransHandler ?
  +    mrg->PerlTransHandler = add->PerlTransHandler ?
           add->PerlTransHandler : base->PerlTransHandler;
   #endif
   #ifdef PERL_CHILD_INIT
  -    new->PerlChildInitHandler = add->PerlChildInitHandler ?
  +    mrg->PerlChildInitHandler = add->PerlChildInitHandler ?
           add->PerlChildInitHandler : base->PerlChildInitHandler;
   #endif
   #ifdef PERL_CHILD_EXIT
  -    new->PerlChildExitHandler = add->PerlChildExitHandler ?
  +    mrg->PerlChildExitHandler = add->PerlChildExitHandler ?
           add->PerlChildExitHandler : base->PerlChildExitHandler;
   #endif
   #ifdef PERL_RESTART
  -    new->PerlRestartHandler = add->PerlRestartHandler ?
  +    mrg->PerlRestartHandler = add->PerlRestartHandler ?
           add->PerlRestartHandler : base->PerlRestartHandler;
   #endif
   #ifdef PERL_INIT
  -    new->PerlInitHandler = add->PerlInitHandler ?
  +    mrg->PerlInitHandler = add->PerlInitHandler ?
           add->PerlInitHandler : base->PerlInitHandler;
   #endif
   
  -    return new;
  +    return mrg;
   }
   
   void *perl_create_server_config (pool *p, server_rec *s)
  @@ -582,10 +582,10 @@
   	}
       }
       else {
  -	char **new;
  +	char **entry;
   	MP_TRACE_d(fprintf(stderr, "push_perl_modules: arg='%s'\n", arg));
  -	new = (char **)push_array(cls->PerlModule);
  -	*new = pstrdup(parms->pool, arg);
  +	entry = (char **)push_array(cls->PerlModule);
  +	*entry = pstrdup(parms->pool, arg);
       }
   
   #ifdef PERL_SECTIONS
  @@ -613,9 +613,9 @@
   	}
       }
       else {
  -	char **new;
  -	new = (char **)push_array(cls->PerlRequire);
  -	*new = pstrdup(parms->pool, arg);
  +	char **entry;
  +	entry = (char **)push_array(cls->PerlRequire);
  +	*entry = pstrdup(parms->pool, arg);
       }
   
   #ifdef PERL_SECTIONS
  @@ -699,9 +699,9 @@
   	mp_PassEnv(arg);
       }
       else {
  -	char **new;
  -	new = (char **)push_array(cls->PerlPassEnv);
  -	*new = pstrdup(parms->pool, arg);
  +	char **entry;
  +	entry = (char **)push_array(cls->PerlPassEnv);
  +	*entry = pstrdup(parms->pool, arg);
       }
       MP_TRACE_d(fprintf(stderr, "perl_cmd_pass_env: arg=`%s'\n", arg));
       arg = NULL;
  @@ -915,7 +915,7 @@
   static void *perl_perl_merge_cfg(pool *p, void *basev, void *addv, char *meth)
   {
       GV *gv;
  -    mod_perl_perl_dir_config *new = NULL,
  +    mod_perl_perl_dir_config *mrg = NULL,
   	*basevp = (mod_perl_perl_dir_config *)basev,
   	*addvp  = (mod_perl_perl_dir_config *)addv;
   
  @@ -933,7 +933,7 @@
       if((gv = gv_fetchmethod_autoload(SvSTASH(SvRV(basesv)), meth, FALSE)) && isGV(gv))
{
   	int count;
   	dSP;
  -	new = (mod_perl_perl_dir_config *)
  +	mrg = (mod_perl_perl_dir_config *)
   	    palloc(p, sizeof(mod_perl_perl_dir_config));
   
   	MP_TRACE_c(fprintf(stderr, "calling %s->%s\n", 
  @@ -948,17 +948,17 @@
   	if((perl_eval_ok(NULL) == OK) && (count == 1)) {
   	    sv = POPs;
   	    ++SvREFCNT(sv);
  -	    new->obj = sv;
  -	    new->pclass = SvCLASS(sv);
  +	    mrg->obj = sv;
  +	    mrg->pclass = SvCLASS(sv);
   	}
   	PUTBACK;
   	FREETMPS;LEAVE;
       }
       else {
  -	new->obj = newSVsv(basesv);
  -	new->pclass = basevp->pclass;
  +	mrg->obj = newSVsv(basesv);
  +	mrg->pclass = basevp->pclass;
       }
  -    return (void *)new;
  +    return (void *)mrg;
   }
   
   void *perl_perl_merge_dir_config(pool *p, void *basev, void *addv)
  @@ -998,7 +998,7 @@
       obj = perl_perl_create_dir_config(&data->obj, CvSTASH(cv), cmd);
   
       if(xsmod && 
  -       (sdata = get_module_config(cmd->server->module_config, xsmod))) {
  +       (sdata = (mod_perl_perl_dir_config *)get_module_config(cmd->server->module_config,
xsmod))) {
   	(void)perl_perl_create_srv_config(&sdata->obj, CvSTASH(cv), cmd);
   	set_module_config(cmd->server->module_config, xsmod, sdata);
       }
  @@ -1088,15 +1088,15 @@
       (void)hv_iterinit(hv); \
       while ((val = hv_iternextsv(hv, (char **) &key, &klen))) { \
           HV *tab = Nullhv; \
  -        AV *list = Nullav; \
  +        AV *entries = Nullav; \
   	if(SvMAGICAL(val)) mg_get(val); \
   	if(SvROK(val) && (SvTYPE(SvRV(val)) == SVt_PVHV)) \
   	    tab = (HV *)SvRV(val); \
   	else if(SvROK(val) && (SvTYPE(SvRV(val)) == SVt_PVAV)) \
  -	    list = (AV *)SvRV(val); \
  +	    entries = (AV *)SvRV(val); \
   	else \
   	    croak("value of `%s' is not a HASH or ARRAY reference!", key); \
  -	if(list || tab) { \
  +	if(entries || tab) { \
   
   #define dSECiter_stop \
           } \
  @@ -1105,8 +1105,8 @@
   #define SECiter_list(t) \
   { \
       I32 i; \
  -    for(i=0; i<=AvFILL(list); i++) { \
  -        SV *rv = *av_fetch(list, i, FALSE); \
  +    for(i=0; i<=AvFILL(entries); i++) { \
  +        SV *rv = *av_fetch(entries, i, FALSE); \
           HV *nhv; \
           if(!SvROK(rv) || (SvTYPE(SvRV(rv)) != SVt_PVHV)) \
      	    croak("not a HASH reference!"); \
  @@ -1116,7 +1116,7 @@
           t; \
           SvREFCNT_dec(nhv); \
       } \
  -    list = Nullav; \
  +    entries = Nullav; \
       continue; \
   }
   
  @@ -1187,7 +1187,7 @@
       const char *errmsg = NULL;
       dSECiter_start
   
  -    if(list) {
  +    if(entries) {
   	SECiter_list(perl_virtualhost_section(cmd, dummy, tab));
       }
   
  @@ -1244,7 +1244,7 @@
   
       void *new_url_conf;
   
  -    if(list) {
  +    if(entries) {
   	SECiter_list(perl_urlsection(cmd, dummy, tab));
       }
   
  @@ -1296,7 +1296,7 @@
       void *new_dir_conf;
       regex_t *r = NULL;
   
  -    if(list) {
  +    if(entries) {
   	SECiter_list(perl_dirsection(cmd, dummy, tab));
       }
   
  @@ -1358,7 +1358,7 @@
       void *new_file_conf;
       regex_t *r = NULL;
   
  -    if(list) {
  +    if(entries) {
   	SECiter_list(perl_filesection(cmd, dummy, tab));
       }
   
  @@ -1711,7 +1711,7 @@
   	    perl_handle_command_hv(hv, key, parms, config);
   	}
   	else if((av = GvAV((GV*)val))) {	
  -	    module *mod = top_module;
  +	    module *tmod = top_module;
   	    const command_rec *c; 
   	    I32 shift, alen = AvFILL(av);
   
  @@ -1722,7 +1722,7 @@
   		continue;
   	    }
   
  -	    if(!(c = find_command_in_modules((const char *)key, &mod))) {
  +	    if(!(c = find_command_in_modules((const char *)key, &tmod))) {
   		fprintf(stderr, "command_rec for directive `%s' not found!\n", key);
   		continue;
   	    }
  
  
  
  1.32      +13 -13    modperl/src/modules/perl/perl_util.c
  
  Index: perl_util.c
  ===================================================================
  RCS file: /home/cvs/modperl/src/modules/perl/perl_util.c,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- perl_util.c	1999/07/01 22:07:20	1.31
  +++ perl_util.c	1999/12/21 21:01:11	1.32
  @@ -87,8 +87,8 @@
   
       for(i=0; i<=AvFILL(av); i++) {
   	SV *sv = *av_fetch(av, i, FALSE);    
  -	char **new = (char **) push_array(arr);
  -	*new = pstrdup(p, SvPV(sv,na));
  +	char **entry = (char **) push_array(arr);
  +	*entry = pstrdup(p, SvPV(sv,na));
       }
   
       return arr;
  @@ -282,14 +282,14 @@
   
   /* execute END blocks */
   
  -void perl_run_blocks(I32 oldscope, AV *list)
  +void perl_run_blocks(I32 oldscope, AV *subs)
   {
       STRLEN len;
       I32 i;
       dTHR;
   
  -    for(i=0; i<=AvFILL(list); i++) {
  -	CV *cv = (CV*)*av_fetch(list, i, FALSE);
  +    for(i=0; i<=AvFILL(subs); i++) {
  +	CV *cv = (CV*)*av_fetch(subs, i, FALSE);
   	SV* atsv = ERRSV;
   
   	MARK_WHERE("END block", (SV*)cv);
  @@ -298,7 +298,7 @@
   	UNMARK_WHERE;
   	(void)SvPV(atsv, len);
   	if (len) {
  -	    if (list == beginav)
  +	    if (subs == beginav)
   		sv_catpv(atsv, "BEGIN failed--compilation aborted");
   	    else
   		sv_catpv(atsv, "END failed--cleanup aborted");
  @@ -506,13 +506,13 @@
       return sv;
   }
   
  -int perl_require_module(char *mod, server_rec *s)
  +int perl_require_module(char *name, server_rec *s)
   {
       dTHR;
       SV *sv = sv_newmortal();
       sv_setpvn(sv, "require ", 8);
  -    MP_TRACE_d(fprintf(stderr, "loading perl module '%s'...", mod)); 
  -    sv_catpv(sv, mod);
  +    MP_TRACE_d(fprintf(stderr, "loading perl module '%s'...", name)); 
  +    sv_catpv(sv, name);
       perl_eval_sv(sv, G_DISCARD);
       if(s) {
   	if(perl_eval_ok(s) != OK) {
  @@ -534,13 +534,13 @@
    */
   void perl_qrequire_module(char *name) 
   {
  -    OP *mod;
  +    OP *reqop;
       SV *key = perl_module2file(name);
       if((key && hv_exists_ent(GvHV(incgv), key, FALSE)))
   	return;
  -    mod = newSVOP(OP_CONST, 0, key);
  -    /*mod->op_private |= OPpCONST_BARE;*/
  -    utilize(TRUE, start_subparse(FALSE, 0), Nullop, mod, Nullop);
  +    reqop = newSVOP(OP_CONST, 0, key);
  +    /*reqop->op_private |= OPpCONST_BARE;*/
  +    utilize(TRUE, start_subparse(FALSE, 0), Nullop, reqop, Nullop);
   }
   
   void perl_do_file(char *pv)
  
  
  
  1.1                  modperl/src/modules/perl/apache_inc.h
  
  Index: apache_inc.h
  ===================================================================
  #ifdef JW_PERL_OBJECT
  
  #ifdef uid_t
  #define apache_uid_t uid_t
  #undef uid_t
  #endif
  #define uid_t apache_uid_t
  
  #ifdef gid_t
  #define apache_gid_t gid_t
  #undef gid_t
  #endif
  #define gid_t apache_gid_t
  
  #ifdef mode_t
  #define apache_mode_t mode_t
  #undef mode_t
  #endif
  #define mode_t apache_mode_t
  
  #ifdef sleep
  #define apache_sleep sleep
  #undef sleep
  #endif
  
  #ifdef stat
  #define apache_stat stat
  #undef stat
  #endif
  
  #ifdef opendir
  #define apache_opendir opendir
  #undef opendir
  #endif
  
  #ifdef pool
  #undef pool
  #endif
  
  #endif
  
  #ifndef _INCLUDE_APACHE_FIRST
  #ifdef __cplusplus
  extern "C" {
  #endif
  #include "httpd.h" 
  #include "http_config.h" 
  #include "http_protocol.h" 
  #include "http_log.h" 
  #include "http_main.h" 
  #include "http_core.h" 
  #include "http_request.h" 
  #include "util_script.h" 
  #include "http_conf_globals.h"
  #if defined(APACHE_SSL) || defined(MOD_SSL)
  #undef _
  #ifdef _config_h_
  #ifdef CAN_PROTOTYPE
  #define _(args) args
  #else
  #define _(args) ()
  #endif
  #endif
  #endif
  #ifdef __cplusplus
  }
  #endif
  #endif
  
  #ifdef JW_PERL_OBJECT
  
  #undef uid_t
  #ifdef apache_uid_t
  #define uid_t apache_uid_t
  #undef apache_uid_t
  #endif
  
  #undef gid_t
  #ifdef apache_gid_t
  #define gid_t apache_gid_t
  #undef apache_gid_t
  #endif
  
  #undef mode_t
  #ifdef apache_mode_t
  #define gid_t apache_mode_t
  #undef apache_mode_t
  #endif
  
  #ifdef apache_sleep
  #undef sleep
  #define sleep apache_sleep
  #undef apache_sleep
  #endif
  
  #ifdef apache_stat
  #undef stat
  #define stat apache_stat
  #undef apache_stat
  #endif
  
  #ifdef apache_opendir
  #undef opendir
  #define opendir apache_opendir
  #undef apache_opendir
  #endif
  
  #endif
  
  
  

Mime
View raw message