Subject: | PersistentPerl build breaks under perl 5.10 |
Under perl 5.10, the perlclib function 'New' has been removed.
In PersistentPerl 2.22, this function was #defined as perperl_new.
It seems that the perl 5.10 replacement for this is 'Newx'. I replaced
'New' with 'Newx' in the attached patch. The patch also includes the
previous memory leak patch (bug 16419).
With this patch, PersistentPerl 2.22 works under Linux i386:
Linux pegasus.cosmic.ucar.edu 2.6.9-67.0.4.EL #1 Sun Feb 3 06:53:29 EST
2008 i686 i686 i386 GNU/Linux
Subject: | PersistentPerl-2.22.patch |
diff -Naur PersistentPerl-2.22/src/perperl_backend_main.c PersistentPerl-2.22.new/src/perperl_backend_main.c
--- PersistentPerl-2.22/src/perperl_backend_main.c 2003-10-11 22:49:02.000000000 -0600
+++ PersistentPerl-2.22.new/src/perperl_backend_main.c 2008-02-15 10:06:57.000000000 -0700
@@ -176,6 +176,12 @@
DIE_QUIET("Cannot allocate perl");
perl_construct(my_perl);
+ /* Patch applied from CPAN bug tracker for SpeedyCGI (another name for PersistentPerl)
+ 2/15/2008 D. Hunt */
+#if defined(PL_use_safe_putenv) || defined(PL_Guse_safe_putenv)
+ PL_use_safe_putenv = 0;
+#endif
+
#ifdef PERPERL_DEBUG
dont_fork = getenv("PERPERL_NOPARENT") != NULL;
#endif
diff -Naur PersistentPerl-2.22/src/perperl_backend_main.h PersistentPerl-2.22.new/src/perperl_backend_main.h
--- PersistentPerl-2.22/src/perperl_backend_main.h 2003-10-11 22:49:02.000000000 -0600
+++ PersistentPerl-2.22.new/src/perperl_backend_main.h 2008-02-15 10:08:12.000000000 -0700
@@ -16,7 +16,6 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
-
/* Glue */
#define perperl_memcpy(d,s,n) Copy(s,d,n,char)
@@ -38,7 +37,9 @@
#else
-#define perperl_new(s,n,t) New(123,s,n,t)
+/* Under perl 5.10 the old New perlclib call is gone. Replaced with the Newx function
+ 2/15/2008 D. Hunt */
+#define perperl_new(s,n,t) Newx(s,n,t)
#define perperl_renew Renew
#define perperl_free Safefree