Author: richter
Date: Sat Apr 8 05:28:12 2006
New Revision: 392518
URL: http://svn.apache.org/viewcvs?rev=392518&view=rev
Log:
Apache 2.2 support
Modified:
perl/embperl/trunk/Changes.pod
perl/embperl/trunk/epapfilter.c
perl/embperl/trunk/epdom.c
perl/embperl/trunk/epnames.h
perl/embperl/trunk/mod_embperl.c
Modified: perl/embperl/trunk/Changes.pod
URL:
http://svn.apache.org/viewcvs/perl/embperl/trunk/Changes.pod?rev=392518&r1=392517&r2=392518&view=diff
==============================================================================
--- perl/embperl/trunk/Changes.pod (original)
+++ perl/embperl/trunk/Changes.pod Sat Apr 8 05:28:12 2006
@@ -7,6 +7,7 @@
for debugging purpose.
- [$ sub $] return value is handled now corretly
in scalar and array context
+ - Added support for Apache 2.2
- Added Table of Content pod file, which lists
all available Embperl documentation, to get
a better overview. Thanks to Axel Beckert.
Modified: perl/embperl/trunk/epapfilter.c
URL:
http://svn.apache.org/viewcvs/perl/embperl/trunk/epapfilter.c?rev=392518&r1=392517&r2=392518&view=diff
==============================================================================
--- perl/embperl/trunk/epapfilter.c (original)
+++ perl/embperl/trunk/epapfilter.c Sat Apr 8 05:28:12 2006
@@ -206,7 +206,10 @@
epTHX_
- APR_BRIGADE_FOREACH(b, bb)
+ //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)) */
Modified: perl/embperl/trunk/epdom.c
URL:
http://svn.apache.org/viewcvs/perl/embperl/trunk/epdom.c?rev=392518&r1=392517&r2=392518&view=diff
==============================================================================
--- perl/embperl/trunk/epdom.c (original)
+++ perl/embperl/trunk/epdom.c Sat Apr 8 05:28:12 2006
@@ -3486,7 +3486,7 @@
tNodeData * pParent ;
tNodeData * pNxt ;
- if (pNode -> xNext == pNode -> xNdx)
+ if (pNode -> nType == ntypAttr || pNode -> xNext == pNode -> xNdx)
return NULL ;
if ((pParent = Node_selfLevel (a, pDomTree, pNode -> xParent,
nRepeatLevel)) != NULL)
@@ -3536,7 +3536,7 @@
tNodeData * pNode = Node_selfNotNullLevel (a, pDomTree, xNode,
nRepeatLevel) ;
tNodeData * pParent ;
- if (pNode -> xNext == pNode -> xNdx)
+ if (pNode -> nType == ntypAttr || pNode -> xNext == pNode -> xNdx)
return 0 ;
pParent = Node_selfLevel (a, pDomTree, pNode -> xParent, nRepeatLevel) ;
@@ -3564,7 +3564,7 @@
{
tNodeData * pParent ;
- if (pNode -> xPrev == pNode -> xNdx)
+ if (pNode -> nType == ntypAttr || pNode -> xPrev == pNode -> xNdx)
return 0 ;
pParent = Node_selfLevel (a, pDomTree, pNode -> xParent, nRepeatLevel) ;
@@ -3597,7 +3597,7 @@
tNodeData * pNode = Node_selfNotNullLevel (a, pDomTree, xNode,
nRepeatLevel) ;
tNodeData * pParent ;
- if (pNode -> xPrev == pNode -> xNdx)
+ if (pNode -> nType == ntypAttr || pNode -> xPrev == pNode -> xNdx)
return 0 ;
pParent = Node_selfLevel (a, pDomTree, pNode -> xParent, nRepeatLevel) ;
Modified: perl/embperl/trunk/epnames.h
URL:
http://svn.apache.org/viewcvs/perl/embperl/trunk/epnames.h?rev=392518&r1=392517&r2=392518&view=diff
==============================================================================
--- perl/embperl/trunk/epnames.h (original)
+++ perl/embperl/trunk/epnames.h Sat Apr 8 05:28:12 2006
@@ -466,11 +466,13 @@
#define apr_pstrdup ap_pstrdup
#define apr_palloc ap_palloc
+#define apr_pcalloc ap_pcalloc
#define apr_pool_t pool
#define apr_array_header_t array_header
#define apr_table_entry_t table_entry
#define apr_table_elts table_elts
#define apr_table_get ap_table_get
+#define apr_table_do ap_table_do
#define apr_table_set ap_table_set
#define apr_table_add ap_table_add
Modified: perl/embperl/trunk/mod_embperl.c
URL:
http://svn.apache.org/viewcvs/perl/embperl/trunk/mod_embperl.c?rev=392518&r1=392517&r2=392518&view=diff
==============================================================================
--- perl/embperl/trunk/mod_embperl.c (original)
+++ perl/embperl/trunk/mod_embperl.c Sat Apr 8 05:28:12 2006
@@ -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, 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) ; \
@@ -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) ; \
@@ -1164,7 +1164,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++ ;
@@ -1174,7 +1174,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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]