From b92f17277eb92da18366ccddeffcea997692f9e5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 31 Jul 2017 12:10:36 -0400 Subject: PL/Perl portability fix: avoid including XSUB.h in plperl.c. Back-patch of commit bebe174bb4462ef079a1d7eeafb82ff969f160a4, which see for more info. Patch by me, with some help from Ashutosh Sharma Discussion: https://postgr.es/m/CANFyU97OVQ3+Mzfmt3MhuUm5NwPU=-FtbNH5Eb7nZL9ua8=rcA@mail.gmail.com --- src/pl/plperl/plperl_helpers.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/pl/plperl/plperl_helpers.h') diff --git a/src/pl/plperl/plperl_helpers.h b/src/pl/plperl/plperl_helpers.h index e8e3f483541..d40567be80f 100644 --- a/src/pl/plperl/plperl_helpers.h +++ b/src/pl/plperl/plperl_helpers.h @@ -1,6 +1,8 @@ #ifndef PL_PERL_HELPERS_H #define PL_PERL_HELPERS_H +#include "mb/pg_wchar.h" + /* * convert from utf8 to database encoding * @@ -59,6 +61,7 @@ utf_e2u(const char *str) static inline char * sv2cstr(SV *sv) { + dTHX; char *val, *res; STRLEN len; @@ -116,6 +119,7 @@ sv2cstr(SV *sv) static inline SV * cstr2sv(const char *str) { + dTHX; SV *sv; char *utf8_str; @@ -143,6 +147,8 @@ cstr2sv(const char *str) static inline void croak_cstr(const char *str) { + dTHX; + #ifdef croak_sv /* Use sv_2mortal() to be sure the transient SV gets freed */ croak_sv(sv_2mortal(cstr2sv(str))); -- cgit v1.2.3