From f31c6eed2275930127050c5395e103e816de9c87 Mon Sep 17 00:00:00 2001 From: Jan Dubois Date: Thu, 17 Mar 2011 10:14:19 -0700 Subject: [PATCH] #81026: Perl binary no longer relocatable Provide a preprocessor macro PERL_RELOCATABLE_INCPUSH to tell incpush_use_sep() to ignore the passed in len argument. This enables relocatable Perl distributions that patch the various paths at install time. Core Perl neither provides actual relocation scripts/programs, nor endorses this practise as being "supported"; this patch only makes it possible to create such tools. It is therefore undocumented outside the source level comments. --- perl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/perl.c b/perl.c index bfa4fe8..8e918c2 100644 --- a/perl.c +++ b/perl.c @@ -4641,7 +4641,15 @@ S_incpush_use_sep(pTHX_ const char *p, STRLEN len, U32 flags) PERL_ARGS_ASSERT_INCPUSH_USE_SEP; + /* perl compiled with -DPERL_RELOCATABLE_INCPUSH will ignore the len + * argument to incpush_use_sep. This allows creation of relocatable + * Perl distributions that patch the binary at install time. Those + * distributions will have to provide their own relocation tools; this + * is not a feature otherwise supported by core Perl. + */ +#ifndef PERL_RELOCATABLE_INCPUSH if (!len) +#endif len = strlen(p); end = p + len; -- 2.7.4