Skip to content

Commit 97baa1c

Browse files
Drew Vogelchrisbra
authored andcommitted
patch 9.1.1096: if_perl: Perl 5.38 adds new symbols causing link failure
Problem: if_perl: Perl 5.38 adds new symbols causing link failure Solution: add stub symbols (Drew Vogel) closes: #16611 Signed-off-by: Drew Vogel <dvogel@github> Signed-off-by: Christian Brabandt <cb@256bit.org>
1 parent 7de6b1b commit 97baa1c

2 files changed

Lines changed: 28 additions & 4 deletions

File tree

src/if_perl.xs

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ typedef int perl_key;
192192
# define Perl_croak_xs_usage dll_Perl_croak_xs_usage
193193
# endif
194194
# ifndef PROTO
195-
# ifdef PERL_IMPLICIT_CONTEXT
195+
# if defined(PERL_IMPLICIT_CONTEXT)
196196
# define Perl_croak_nocontext dll_Perl_croak_nocontext
197197
# endif
198198
# define Perl_call_argv dll_Perl_call_argv
@@ -312,6 +312,9 @@ typedef int perl_key;
312312
# ifdef PERL_USE_THREAD_LOCAL
313313
# define PL_current_context *dll_PL_current_context
314314
# endif
315+
# if defined(DYNAMIC_PERL) && ((PERL_REVISION == 5) && (PERL_VERSION >= 38))
316+
# define PL_memory_wrap *dll_PL_memory_wrap
317+
# endif
315318
# define Perl_hv_iternext_flags dll_Perl_hv_iternext_flags
316319
# define Perl_hv_iterinit dll_Perl_hv_iterinit
317320
# define Perl_hv_iterkey dll_Perl_hv_iterkey
@@ -352,7 +355,7 @@ static void (*Perl_croak_xs_usage)(pTHX_ const CV *const, const char *const para
352355
__attribute__noreturn__;
353356
# endif
354357
# endif
355-
# ifdef PERL_IMPLICIT_CONTEXT
358+
# if defined(PERL_IMPLICIT_CONTEXT)
356359
static void (*Perl_croak_nocontext)(const char*, ...) __attribute__noreturn__;
357360
# endif
358361
static I32 (*Perl_dowantarray)(pTHX);
@@ -484,6 +487,9 @@ static perl_key* (*Perl_Gthr_key_ptr)_((pTHX));
484487
# ifdef PERL_USE_THREAD_LOCAL
485488
static void** dll_PL_current_context;
486489
# endif
490+
# if defined(DYNAMIC_PERL) && ((PERL_REVISION == 5) && (PERL_VERSION >= 38))
491+
static const char **dll_PL_memory_wrap;
492+
# endif
487493
static void (*boot_DynaLoader)_((pTHX_ CV*));
488494
static HE * (*Perl_hv_iternext_flags)(pTHX_ HV *, I32);
489495
static I32 (*Perl_hv_iterinit)(pTHX_ HV *);
@@ -633,9 +639,12 @@ static struct {
633639
# ifdef USE_ITHREADS
634640
{"PL_thr_key", (PERL_PROC*)&dll_PL_thr_key},
635641
# endif
636-
# ifdef PERL_USE_THREAD_LOCAL
642+
# ifdef PERL_USE_THREAD_LOCAL
637643
{"PL_current_context", (PERL_PROC*)&dll_PL_current_context},
638-
# endif
644+
# endif
645+
# if defined(DYNAMIC_PERL) && ((PERL_REVISION == 5) && (PERL_VERSION >= 38))
646+
{"PL_memory_wrap", (PERL_PROC*)&dll_PL_memory_wrap},
647+
# endif
639648
# else
640649
{"Perl_Idefgv_ptr", (PERL_PROC*)&Perl_Idefgv_ptr},
641650
{"Perl_Ierrgv_ptr", (PERL_PROC*)&Perl_Ierrgv_ptr},
@@ -1475,6 +1484,19 @@ vim_IOLayer_init(void)
14751484
// during build time. Manually fix it here by redirecting these functions
14761485
// towards the dynamically loaded version.
14771486

1487+
# if (PERL_REVISION == 5) && (PERL_VERSION >= 38)
1488+
# undef Perl_croak_nocontext
1489+
void Perl_croak_nocontext(const char *pat, ...)
1490+
{
1491+
dTHX;
1492+
va_list args;
1493+
va_start(args, pat);
1494+
(*dll_Perl_croak_nocontext)(pat, &args);
1495+
NOT_REACHED; /* NOTREACHED */
1496+
va_end(args);
1497+
}
1498+
# endif
1499+
14781500
# if (PERL_REVISION == 5) && (PERL_VERSION >= 18)
14791501
# undef Perl_sv_free2
14801502
void Perl_sv_free2(pTHX_ SV *const sv, const U32 refcnt)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
1096,
707709
/**/
708710
1095,
709711
/**/

0 commit comments

Comments
 (0)