perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andargor The Wise <andar...@yahoo.com>
Subject [PATCH] Embperl 2.1.0, mod_perl 2.0.2, Apache 2.2
Date Thu, 22 Dec 2005 14:42:41 GMT
I had trouble compiling Embperl 2.1.0 with mod_perl
2.0.2 and Apache 2.2. I had found a previous patch for
Apache 2.1 and I added some things. The patch I used
is below.

I searched, but could not find and further patches
addressing this. Also, I hopefully did not miss any
installation steps to compile Embperl 2.1.0 with these
versions, which would have made such a patch
irrelevant.

Note on the patch: the "taint" test (#155) fails even
with the patch. I did not know how to fix it. So run
make test TESTARGS="-i".

Hope this helps someone,

Andargor

diff --recursive --unified=3
Embperl-2.1.0/epapfilter.c
Embperl-2.1.0-andargor/epapfilter.c
--- Embperl-2.1.0/epapfilter.c	2005-10-25
18:17:14.000000000 -0400
+++ Embperl-2.1.0-andargor/epapfilter.c	2005-12-21
23:33:40.000000000 -0500
@@ -206,8 +206,9 @@
     epTHX_
 
 
-    APR_BRIGADE_FOREACH(b, bb) 
-        {
+    for (b = APR_BRIGADE_FIRST(bb);
+         b != APR_BRIGADE_SENTINEL(bb);
+         b = APR_BUCKET_NEXT(b)) {
         /* APR_BUCKET_IS_EOS(b) does give undefined
symbol, when running outside of Apache */
         /* if (APR_BUCKET_IS_EOS(b)) */
         if (strcmp (b -> type -> name, "EOS") == 0)
diff --recursive --unified=3
Embperl-2.1.0/mod_embperl.c
Embperl-2.1.0-andargor/mod_embperl.c
--- Embperl-2.1.0/mod_embperl.c	2005-10-25
18:17:14.000000000 -0400
+++ Embperl-2.1.0-andargor/mod_embperl.c	2005-12-21
23:38:16.000000000 -0500
@@ -570,11 +570,11 @@
     embperl_ApacheInitUnload (p) ;
 
 #ifdef APACHE2
-    apr_pool_sub_make(&subpool, p, NULL);
+    apr_pool_create_ex(&subpool, p, NULL, NULL);
 #else
     subpool = ap_make_sub_pool(p);
 #endif
-    cfg = (tApacheDirConfig *) ap_pcalloc(subpool,
sizeof(tApacheDirConfig));
+    cfg = (tApacheDirConfig *) apr_pcalloc(subpool,
sizeof(tApacheDirConfig));
 
 #if 0
 #ifdef APACHE2
@@ -602,7 +602,7 @@
 
 static void *embperl_create_server_config(apr_pool_t
* p, server_rec *s)
     {
-    tApacheDirConfig *cfg = (tApacheDirConfig *)
ap_pcalloc(p, sizeof(tApacheDirConfig));
+    tApacheDirConfig *cfg = (tApacheDirConfig *)
apr_pcalloc(p, sizeof(tApacheDirConfig));
 
     bApDebug |=
ap_exists_config_define("EMBPERL_APDEBUG") ;
 
@@ -726,11 +726,11 @@
 #endif
 
 #ifdef APACHE2
-        apr_pool_sub_make(&subpool, p, NULL);
+        apr_pool_create_ex(&subpool, p, NULL, NULL);
 #else
         subpool = ap_make_sub_pool(p);
 #endif
-        mrg = (tApacheDirConfig *)ap_palloc (subpool,
sizeof(tApacheDirConfig));
+        mrg = (tApacheDirConfig *)apr_palloc
(subpool, sizeof(tApacheDirConfig));
 
         if (bApDebug)
             ap_log_error (APLOG_MARK, APLOG_WARNING |
APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug:
merge_dir/server_config base=0x%p add=0x%p
mrg=0x%p\n", basev, addv, mrg) ;
@@ -826,7 +826,7 @@
 const char * embperl_Apache_Config_##STRUCT##NAME
(cmd_parms *cmd, /* tApacheDirConfig */ void *
pDirCfg, const char* arg) \
     { \
     apr_pool_t * p = cmd -> pool ;    \
-    ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME =
ap_pstrdup(p, arg) ; \
+    ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME =
apr_pstrdup(p, arg) ; \
     ((tApacheDirConfig *)pDirCfg) ->
set_##STRUCT##NAME = 1 ; \
     if (bApDebug) \
         ap_log_error (APLOG_MARK, APLOG_WARNING |
APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug:
Set "#CFGNAME" (type="#TYPE";STR) = %s\n", arg) ; \
@@ -842,7 +842,7 @@
     if (!embperl_CalcExpires(arg, buf, 0)) \
         LogErrorParam (NULL, rcTimeFormatErr,
"EMBPERL_"#CFGNAME, arg) ; \
     else \
-        ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME
= ap_pstrdup(p, buf) ; \
+        ((tApacheDirConfig *)pDirCfg) -> STRUCT.NAME
= apr_pstrdup(p, buf) ; \
     ((tApacheDirConfig *)pDirCfg) ->
set_##STRUCT##NAME = 1 ; \
     if (bApDebug) \
         ap_log_error (APLOG_MARK, APLOG_WARNING |
APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug:
Set "#CFGNAME" (type="#TYPE";STR) = %s\n", arg) ; \
@@ -875,7 +875,7 @@
 #define EPCFG_SAVE(STRUCT,TYPE,NAME,CFGNAME) \
 const char * embperl_Apache_Config_##STRUCT##NAME
(cmd_parms *cmd, /* tApacheDirConfig */ void *
pDirCfg, const char* arg) \
     { \
-    ((tApacheDirConfig *)pDirCfg) ->
save_##STRUCT##NAME = ap_pstrdup(cmd -> pool, arg) ; \
+    ((tApacheDirConfig *)pDirCfg) ->
save_##STRUCT##NAME = apr_pstrdup(cmd -> pool, arg) ;
\
     ((tApacheDirConfig *)pDirCfg) ->
set_##STRUCT##NAME = 1 ; \
     if (bApDebug) \
         ap_log_error (APLOG_MARK, APLOG_WARNING |
APLOG_NOERRNO, APLOG_STATUSCODE NULL, "EmbperlDebug:
Set "#CFGNAME" (type="#TYPE") = %s (save for later
conversion to Perl data)\n", arg) ; \
@@ -1162,7 +1162,7 @@
     pParam -> sUri         = r -> uri ;
     pParam -> sPathInfo    = r -> path_info ;
     pParam -> sQueryInfo   = r -> args ;  
-    if ((p = ep_pstrdup (pPool, ap_table_get (r ->
headers_in, "Accept-Language"))))
+    if ((p = ep_pstrdup (pPool, apr_table_get (r ->
headers_in, "Accept-Language"))))
         {
         while (isspace(*p))
             p++ ;
@@ -1172,7 +1172,7 @@
         *p = '\0' ;
         }
 
-    ap_table_do (embperl_AddCookie, &s, r ->
headers_in, "Cookie", NULL) ;
+    apr_table_do (embperl_AddCookie, &s, r ->
headers_in, "Cookie", NULL) ;
 
     buf[0] = '\0' ;
 #ifdef APACHE2
diff --recursive --unified=3
Embperl-2.1.0/test/conf/httpd.conf.src
Embperl-2.1.0-andargor/test/conf/httpd.conf.src
--- Embperl-2.1.0/test/conf/httpd.conf.src	2005-11-02
18:00:30.000000000 -0500
+++ Embperl-2.1.0-andargor/test/conf/httpd.conf.src
2005-12-21 23:55:35.000000000 -0500
@@ -70,10 +70,13 @@
 #-Tw
 EOD
 
-print OFH "PerlTaintCheck On\n" if (!$ENV{NOTAINT}) ;
+if (!$ENV{NOTAINT}) {
+	print OFH "PerlSwitches -w\n";
+} else {
+	print OFH "PerlSwitches -Tw\n";
+}
 
 print OFH <<EOD ;
-PerlWarn On
 
 
 PerlSetEnv EMBPERL_SRC \"$EPPATH\"
@@ -157,7 +160,7 @@
 
 <Location /embperl/log>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 </Location>
 
@@ -179,25 +182,25 @@
 
 <Location /embperl>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 </Location>
 
 <Location /embperl/sub>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 </Location>
 
 <Location /embperl2>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 </Location>
 
 <Location /embperl/safe>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 4
 </Location>
@@ -226,7 +229,7 @@
 
 <Location /embperl/opmask>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 12
 EMBPERL_COMPARTMENT TEST
@@ -235,7 +238,7 @@
 
 <Location /embperl/rawinput>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 16
 EMBPERL_INPUT_ESCMODE 0
@@ -243,45 +246,45 @@
 
 <Location /embperl/nochdir>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 384
 </Location>
 
 <Location /embperl/nph>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 64
 </Location>
 
 <Location /embperl/stdout>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 #EMBPERL_OPTIONS 16384
 EMBPERL_OPTIONS 16400
 EMBPERL_ESCMODE 0
-PerlSetupEnv Off
+PerlOptions -SetupEnv
 </Location>
 
 <Location /embperl/allform>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 8192
 </Location>
 
 <Location /embperl/noerr>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 2
 </Location>
 
 <Location /embperl/errdoc>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 262144
 ErrorDocument 500 /html/errmsg.htm
@@ -289,7 +292,7 @@
 
 <Location /embperl/errdoc/epl>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_OPTIONS 262144
 ErrorDocument 500 /embperl/errmsg2.htm
@@ -297,7 +300,7 @@
 
 <Location /embperl/match>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_URIMATCH \\.htm\$
 </Location>
@@ -308,7 +311,7 @@
 
 
 
-print OFH "PerlHandler ", $MP2?'ModPerl':'Apache',
"::Registry\n" ;
+print OFH "PerlResponseHandler ",
$MP2?'ModPerl':'Apache', "::Registry\n" ;
 
 
 
@@ -324,7 +327,7 @@
 EMBPERL_OBJECT_FALLBACK epofallback.htm
 EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\"
 SetHandler perl-script
-PerlHandler Embperl::Object 
+PerlResponseHandler Embperl::Object 
 Options ExecCGI
 </Location>
 
@@ -336,7 +339,7 @@
 EMBPERL_OBJECT_FALLBACK epofallback.htm
 EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\"
 SetHandler perl-script
-PerlHandler Embperl::Object 
+PerlResponseHandler Embperl::Object 
 Options ExecCGI
 </Location>
 
@@ -348,7 +351,7 @@
 EMBPERL_OBJECT_FALLBACK epofallback.htm
 EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\"
 SetHandler perl-script
-PerlHandler Embperl::Object 
+PerlResponseHandler Embperl::Object 
 Options ExecCGI
 </Location>
 
@@ -359,7 +362,7 @@
 EMBPERL_OBJECT_FALLBACK epofallback.htm
 EMBPERL_URIMATCH \"\\.htm.?\$|\\.epl\$\"
 SetHandler perl-script
-PerlHandler Embperl::Object 
+PerlResponseHandler Embperl::Object 
 Options ExecCGI
 EMBPERL_OPTIONS 262144
 ErrorDocument 500 /embperl/errmsg2.htm
@@ -385,28 +388,28 @@
 
 <Location /embperl/sidurl>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_SESSION_MODE 0x20
 </Location>
 
 <Location /embperl/uidurl>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_SESSION_MODE 0x02
 </Location>
 
 <Location /embperl/suidurl>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_SESSION_MODE 0x22
 </Location>
 
 <Location /embperlmail>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_APPNAME MailApp
 EMBPERL_MAILHOST mail.i.ecos.de
@@ -658,7 +661,7 @@
 
 <Location /perl-status>
 SetHandler perl-script
-PerlHandler Apache::Status
+PerlResponseHandler Apache::Status
 PerlSetVar StatusOptionsAll On
 </Location>
 
@@ -692,7 +695,7 @@
 
 <Location /eg/x>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI FollowSymLinks
 EMBPERL_INPUT_ESCMODE 7
 EMBPERL_OPTIONS 262288
@@ -710,7 +713,7 @@
 EMBPERL_OBJECT_STOPDIR \"$EPPATH/eg/web\"
 EMBPERL_URIMATCH
\"\\.htm.?\$|\\.epl\$|\\.xml\$|\\.pod\$|/$\"
 SetHandler perl-script
-PerlHandler Embperl::Object 
+PerlResponseHandler Embperl::Object 
 Options ExecCGI
 </Location>
 
@@ -722,12 +725,12 @@
 EMBPERL_URIMATCH
\"\\.htm.?\$|\\.epl\$|\\.xml\$|\\.pod\$|/$\"
 EMBPERL_PATH \"$EPPATH/eg/web/conf;$EPPATH/eg/web\"
 sethandler perl-script
-perlhandler Embperl
+PerlResponseHandler Embperl
 </Location>
 
 <Location /eg/xml>
 SetHandler perl-script
-PerlHandler Embperl
+PerlResponseHandler Embperl
 Options ExecCGI
 EMBPERL_XSLTSTYLESHEET \"$EPPATH/eg/xml/pod.xsl\"
 EMBPERL_XSLTPROC libxslt
@@ -751,7 +754,7 @@
 <Location /kwiki>
    SetHandler  perl-script
    PerlSetVar  KwikiBaseDir $EPPATH/eg/kwiki
-   PerlHandler Kwiki::ModPerl
+   PerlResponseHandler Kwiki::ModPerl
 </Location>
 Alias /ckwiki $EPPATH/eg/kwiki
 
diff --recursive --unified=3
Embperl-2.1.0/test/html/taint.htm
Embperl-2.1.0-andargor/test/html/taint.htm
--- Embperl-2.1.0/test/html/taint.htm	2005-10-25
18:17:06.000000000 -0400
+++ Embperl-2.1.0-andargor/test/html/taint.htm
2005-12-22 00:03:32.000000000 -0500
@@ -12,7 +12,7 @@
 when running with -T option or PaintTaintCheck on <P>
 
 
-[+ do { system ('echo blabla') ;}  +]
+[+ eval { do { system ('echo blabla') ;} }  +]
 
 <P>Ok.<P>
 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message