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

Regina Obe <lr@pcorp.us>

From: "Regina Obe" <lr@pcorp.us>
To: "'Tom Lane'" <tgl@sss.pgh.pa.us>, 'Juan José Santamaría Flecha' <juanjo.santamaria@gmail.com>
Cc: "'PostgreSQL mailing lists'" <pgsql-bugs@lists.postgresql.org>
Date: 2021-03-14T00:30:03Z
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

Confirmed both PostgreSQL and PostGIS pass all tests with this patch.




Commits

  1. Work around issues in MinGW-64's setjmp/longjmp support.