PATCH - FreeBSD, Perl 5.8.6
Jeff Bachtel <[email protected]> Wed, 20 Apr 2005 18:43:32 -0500
| Newsgroups | gmane.comp.web.zope.perl |
|---|---|
| Message-ID | <[email protected]> |
--AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline The attached patch allows pyperl to build and test on FreeBSD. At least, it did in its initial state (I haven't tested the generation from try_perlapi.pl, rather I had been modifying the generated .c file). Basically, the short names used by pyperl for internal Perl functions had been phased out, and it was less effort to patch the few calls than to reexpose everything. I also define PERL_EXT at one point to avoid a cxio error. jeff -- Jeff Bachtel (root@VPR,TAMU) http://www.cepheid.org/~jeff "For centuries, man had watched [finger [email protected] for PGP key] the clouds; now, they were watching him." - S. Sachs --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="pyperl-fbsd.patch" diff -ru pyperl-1.0.1-orig/dlhack.c pyperl-1.0.1-mod2/dlhack.c --- pyperl-1.0.1-orig/dlhack.c Tue Mar 6 13:36:16 2001 +++ pyperl-1.0.1-mod2/dlhack.c Wed Apr 20 18:30:18 2005 @@ -46,5 +46,5 @@ return; } } - PyErr_SetString(PyExc_ImportError, "perl2.so not found"); + PyErr_SetString(PyExc_ImportError, dlerror()); } Only in pyperl-1.0.1-mod2/: dlhack.c.orig diff -ru pyperl-1.0.1-orig/setup.py pyperl-1.0.1-mod2/setup.py --- pyperl-1.0.1-orig/setup.py Tue Mar 6 13:36:16 2001 +++ pyperl-1.0.1-mod2/setup.py Wed Apr 20 18:30:58 2005 @@ -94,7 +94,6 @@ cc_extra.append("-DDL_HACK") extra_ext.append(Extension(name = "perl", sources = ["dlhack.c"], - libraries = ["dl"], )) Only in pyperl-1.0.1-mod2/: setup.py.orig diff -ru pyperl-1.0.1-orig/svrv_object.c pyperl-1.0.1-mod2/svrv_object.c --- pyperl-1.0.1-orig/svrv_object.c Tue Mar 6 13:36:16 2001 +++ pyperl-1.0.1-mod2/svrv_object.c Wed Apr 20 18:32:04 2005 @@ -492,7 +492,7 @@ diff = newlen - len; if (newlen && !AvREAL(av) && AvREIFY(av)) - av_reify(av); + Perl_av_reify(aTHX_ av); #ifdef SPLICE_DEBUG printf("splice(offset=%d, len=%d, diff=%d, after=%d, fill=%d, max=%d, pre=%d)\n", Only in pyperl-1.0.1-mod2/: svrv_object.c.orig diff -ru pyperl-1.0.1-orig/try_perlapi.pl pyperl-1.0.1-mod2/try_perlapi.pl --- pyperl-1.0.1-orig/try_perlapi.pl Tue Mar 6 13:36:16 2001 +++ pyperl-1.0.1-mod2/try_perlapi.pl Wed Apr 20 18:35:29 2005 @@ -17,6 +17,7 @@ print C <<EOT; #include <EXTERN.h> +#define PERL_EXT 1 #include <perl.h> #include <Python.h> @@ -50,7 +51,7 @@ ENTER; SAVETMPS; - push_return(Nullop); + Perl_push_return(aTHX_ Nullop); PUSHBLOCK(cx, (CXt_EVAL|CXp_TRYBLOCK), PL_stack_sp); PUSHEVAL(cx, 0, 0); PL_eval_root = PL_op; @@ -71,7 +72,7 @@ POPBLOCK(cx,newpm); POPEVAL(cx); - pop_return(); + Perl_pop_return(aTHX); PL_curpm = newpm; } Only in pyperl-1.0.1-mod2/: try_perlapi.pl.orig --AqsLC8rIMeq19msA Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Zope-perl maillist - [email protected] http://mail.zope.org/mailman/listinfo/zope-perl --AqsLC8rIMeq19msA--