Re: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Juan José Santamaría Flecha <juanjo(dot)santamaria(at)gmail(dot)com>
Cc: Regina Obe <lr(at)pcorp(dot)us>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head
Date: 2021-03-13 23:38:59
Message-ID: 2735801.1615678739@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

I wrote:
> Hmm, interesting. The gcc manual is quite negative about these though:
> https://gcc.gnu.org/onlinedocs/gcc/Nonlocal-Gotos.html
> Also it's not clear that these are compatible with <setjmp.h>'s version
> of jmp_buf.

After further study, I think we could fix the jmp_buf inconsistency as
attached.

I did some googling and found that we'd be in pretty good company if
we go this way: a lot of other projects have concluded that MinGW-64's
setjmp() is hopelessly buggy and adopted this same workaround. It still
makes me a bit nervous though, as this is a serious ABI break for
anything using setjmp/longjmp. We could not back-patch such a change,
and once we ship a release using this we're stuck with it in that
release branch.

Regina, could you confirm whether this fixes things for you?

regards, tom lane

Attachment Content-Type Size
0001-MinGW-x64-setjmp-longjmp-2.patch text/x-diff 1.0 KB

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Regina Obe 2021-03-14 00:30:03 RE: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head
Previous Message Tom Lane 2021-03-13 21:49:44 Re: BUG #16920: Can't compile PostGIS with MingW64 against PostgreSQL 14 head