richter     01/05/28 22:22:19

  Modified:    .        Embperl.pm Embperl.xs Makefile.PL epmain.c
               test/html/registry Execute.htm errpage.htm
  Log:
  Fixes for ActiveState Perl
  
  Revision  Changes    Path
  1.155     +2 -2      embperl/Embperl.pm
  
  Index: Embperl.pm
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.pm,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -r1.154 -r1.155
  --- Embperl.pm        2001/05/25 19:46:28     1.154
  +++ Embperl.pm        2001/05/29 05:22:17     1.155
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: Embperl.pm,v 1.154 2001/05/25 19:46:28 richter Exp $
  +#   $Id: Embperl.pm,v 1.155 2001/05/29 05:22:17 richter Exp $
   #
   ###################################################################################
   
  @@ -90,7 +90,7 @@
   @ISA = qw(Exporter DynaLoader);
   
   
  -$VERSION = '1.3.3_dev';
  +$VERSION = '1.3.3';
   
   # HTML::Embperl cannot be bootstrapped in nonlazy mode except
   # under mod_perl, because its dependencies import symbols like ap_palloc
  
  
  
  1.47      +30 -0     embperl/Embperl.xs
  
  Index: Embperl.xs
  ===================================================================
  RCS file: /home/cvs/embperl/Embperl.xs,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- Embperl.xs        2001/05/25 19:46:30     1.46
  +++ Embperl.xs        2001/05/29 05:22:17     1.47
  @@ -215,10 +215,16 @@
       SV * pApacheReqSV
   PREINIT:
       tReq * r = pCurrReq ;
  +    int  bRestore = 0 ;
  +    SV * pSaveApacheReqSV ;
  +    request_rec * pSaveApacheReq ;
   CODE:
   #ifdef APACHE
       if (pApacheReqSV && r -> pApacheReq == NULL)
           {
  +        bRestore = 1 ;
  +        pSaveApacheReqSV = r -> pApacheReqSV ;
  +        pSaveApacheReq = r -> pApacheReq ;
           if (SvROK (pApacheReqSV))
               r -> pApacheReq = (request_rec *)SvIV((SV*)SvRV(pApacheReqSV));
           else
  @@ -228,6 +234,14 @@
   #endif
        strncpy (r->errdat1, sText, sizeof (r->errdat1) - 1) ;
        LogError (r,code) ;
  +#ifdef APACHE
  +    if (bRestore)
  +        {
  +        r -> pApacheReqSV  = pSaveApacheReqSV  ;
  +        r -> pApacheReq = pSaveApacheReq   ;
  +        }
  +#endif
  +
   
   
   void
  @@ -610,10 +624,17 @@
       int    code
       char * sText
       SV * pApacheReqSV
  +PREINIT:
  +    int  bRestore = 0 ;
  +    SV * pSaveApacheReqSV ;
  +    request_rec * pSaveApacheReq ;
   CODE:
   #ifdef APACHE
       if (pApacheReqSV && r -> pApacheReq == NULL)
           {
  +        bRestore = 1 ;
  +        pSaveApacheReqSV = r -> pApacheReqSV ;
  +        pSaveApacheReq = r -> pApacheReq ;
           if (SvROK (pApacheReqSV))
               r -> pApacheReq = (request_rec *)SvIV((SV*)SvRV(pApacheReqSV));
           else
  @@ -623,6 +644,15 @@
   #endif
        strncpy (r->errdat1, sText, sizeof (r->errdat1) - 1) ;
        LogError (r,code) ;
  +#ifdef APACHE
  +    if (bRestore)
  +        {
  +        r -> pApacheReqSV  = pSaveApacheReqSV  ;
  +        r -> pApacheReq = pSaveApacheReq   ;
  +        }
  +#endif
  +
  +
   
   int
   embperl_getloghandle(r)
  
  
  
  1.49      +4 -1      embperl/Makefile.PL
  
  Index: Makefile.PL
  ===================================================================
  RCS file: /home/cvs/embperl/Makefile.PL,v
  retrieving revision 1.48
  retrieving revision 1.49
  diff -u -r1.48 -r1.49
  --- Makefile.PL       2001/05/18 08:32:09     1.48
  +++ Makefile.PL       2001/05/29 05:22:17     1.49
  @@ -647,18 +647,21 @@
           {
           $EPHTTPD = "$EPHTTPDDLL/Apache.exe" ;
           $EPHTTPD =~ s#core([rd])/Apache.exe#Apache$1/Apache.exe#i ;
  +        $EPHTTPD =~ s#libexec/Apache.exe#Apache.exe#i ;
           $EPUSER  = 'www' ; # dummy value
           $EPGROUP = 'www' ;
           if (!-e $EPHTTPD)
               {
               $EPHTTPD = GetString ("Enter path and file to start as Apache.exe", 
"$EPHTTPD") ;
               }
  +        $EPHTTPDPATH = $EPHTTPD ;
  +        $EPHTTPDPATH =~ s/Apache.exe//i ;
           }
       
   
       ### check the apache version ###
                                   
  -    $EPENVPATH = 
";$EPHTTPDDLL;$EPHTTPDDLL/../os/win32/release;$EPHTTPDDLL/../os/win32/debug" ;
  +    $EPENVPATH = 
";$Config{bin};$EPHTTPDDLL;$EPHTTPDPATH;$EPHTTPDDLL/../os/win32/release;$EPHTTPDDLL/../os/win32/debug"
 ;
       $ENV{PATH} .= $EPENVPATH if ($win32) ;
       
       @EPAPACHEVERSION = start ("$EPHTTPD -v") ;
  
  
  
  1.102     +4 -1      embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.101
  retrieving revision 1.102
  diff -u -r1.101 -r1.102
  --- epmain.c  2001/05/22 11:19:49     1.101
  +++ epmain.c  2001/05/29 05:22:17     1.102
  @@ -10,7 +10,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: epmain.c,v 1.101 2001/05/22 11:19:49 richter Exp $
  +#   $Id: epmain.c,v 1.102 2001/05/29 05:22:17 richter Exp $
   #
   
###################################################################################*/
   
  @@ -3463,6 +3463,7 @@
   
       /* --- change working directory --- */
       
  +     /* ### */lprintf (r, "discd=%d if=%s rok=%d\n", (r -> bOptions & 
optDisableChdir), sInputfile, SvROK(r -> pInData)) ;
       if ((r -> bOptions & optDisableChdir) == 0 && sInputfile != NULL && sInputfile 
!= '\0' && !SvROK(r -> pInData))
        {
        char dir[PATH_MAX];
  @@ -3484,6 +3485,8 @@
   
        _splitpath(sInputfile, drive, dir, fname, ext );
        _chdrive (drive[0] - 'A' + 1) ;
  +
  +     /* ### */lprintf (r, "olddrv=%d olddir=%s drive=%s dir=%s fname=%s ext=%s\n", 
olddrive, olddir, drive, dir, fname, ext) ;
   #else
           Dirname (sInputfile, dir, sizeof (dir) - 1) ;
        getcwd (olddir, sizeof (olddir) - 1) ;
  
  
  
  1.4       +8 -0      embperl/test/html/registry/Execute.htm
  
  Index: Execute.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/registry/Execute.htm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Execute.htm       2001/03/27 12:27:58     1.3
  +++ Execute.htm       2001/05/29 05:22:19     1.4
  @@ -9,6 +9,14 @@
   
   my($r) = @_;
   
  +# workaround for broken $r -> chdir_file in Apache::Registry on ActiveState perl
  +use Cwd ;
  +use File::Basename ;
  +
  +my $fn = $r -> filename ;
  +chdir(dirname ($fn)) ;
  +
  +
   $HTML::Embperl::DebugDefault = 811005 ;
   
   
  
  
  
  1.2       +7 -0      embperl/test/html/registry/errpage.htm
  
  Index: errpage.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/registry/errpage.htm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- errpage.htm       1998/07/14 20:11:25     1.1
  +++ errpage.htm       2001/05/29 05:22:19     1.2
  @@ -9,6 +9,13 @@
   
   my($r) = @_;
   
  +# workaround for broken $r -> chdir_file in Apache::Registry on ActiveState perl
  +use Cwd ;
  +use File::Basename ;
  +
  +my $fn = $r -> filename ;
  +chdir(dirname ($fn)) ;
  +
   $HTML::Embperl::DebugDefault = 811005 ;
   
   
  
  
  

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

Reply via email to