Re: windows cfbot failing: my_perl - Mailing list pgsql-hackers

From Andres Freund
Subject Re: windows cfbot failing: my_perl
Date
Msg-id 20220826202830.26fn67xocpryulrj@awork3.anarazel.de
Whole thread Raw
In response to Re: windows cfbot failing: my_perl  (Andres Freund <andres@anarazel.de>)
Responses Re: windows cfbot failing: my_perl
List pgsql-hackers
Hi,

Tom, Ilmari, you seem to have hacked on this stuff most (not so) recently. Do
you have a better suggestion than moving the mb/pg_wchar.h include out of
plperl_helpers.h as I suggest below?

On 2022-08-26 07:47:40 -0700, Andres Freund wrote:
> On 2022-08-26 21:39:05 +0700, John Naylor wrote:
> > On Fri, Aug 26, 2022 at 9:27 PM Andres Freund <andres@anarazel.de> wrote:
> > >
> > > Because perl, extremely unhelpfully, #defines free. Which, not surprisingly,
> > > causes issues when including system headers referencing free as well.
> > >
> > > I don't really see a good solution to this other than hoisting the
> > > mb/pg_wchar.h include out to before we include all the perl stuff. That does
> > > fix the issue.
> >
> > We could also move is_valid_ascii somewhere else. It's only
> > tangentially related to "wide chars" anyway.
>
> Given the crazy defines of stuff like free, it seems like a good idea to have
> a rule that no headers should be included after plperl.h with
> PG_NEED_PERL_XSUB_H defined.  It's not like there's not other chances of of
> pulling in malloc.h from within pg_wchar.h somehow.
>
> It's a bit ugly to have the mb/pg_wchar.h in plperl.h instead of
> plperl_helpers.h, but ...

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Strip -mmacosx-version-min options from plperl build
Next
From: Tom Lane
Date:
Subject: Re: windows cfbot failing: my_perl