Re: PostgreSQL does not compile on macOS SDK 15.0
Thomas Munro <thomas.munro@gmail.com>
From: Thomas Munro <thomas.munro@gmail.com>
To: Aleksander Alekseev <aleksander@timescale.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>,
Tom Lane <tgl@sss.pgh.pa.us>, Andres Freund <andres@anarazel.de>, Stan Hu <stanhu@gmail.com>
Date: 2024-07-04T23:54:29Z
Lists: pgsql-hackers
On Thu, Jul 4, 2024 at 9:12 PM Aleksander Alekseev <aleksander@timescale.com> wrote: > I checked against SDK 15 and 14. I also checked that it doesn't break > something on Linux. Thanks for testing! > The patch seems to work. I don't have a Windows machine unfortunately. Yeah, Windows doesn't have <regex.h> (it has <regex> as part of the C++ standard library, but nothing for C because that's from POSIX, not the C standard library). So I just skip the #include on Windows, and I see that it's passing on all CI. It seems like there is no reason not to go ahead and push this, including back-patching, then. I had been thinking that I should try harder to make the pg_ prefix compile-time configurable (imagine some kind of string-pasting macros constructing the names), so that TCL and PG could have fewer diffs. But we're already not doing that for the function names, so unless Tom wants me to try to do that...? It's a funny position to finish up in: we have pg_ functions, pg_ types but still standard REG_XXX macros. In the future someone might want to rename them all to PG_REG_XXX, so that we completely move out of the way of the system regex stuff. But not today, and certainly not in back-branches.
Commits
-
Cope with <regex.h> name clashes.
- 9c273679b36b 17.0 landed
- 31423bc4489d 16.4 landed
- 467d77bb1634 15.8 landed
- c2342a925b70 14.13 landed
- 440aedc0fb18 13.16 landed
- 274a8195d479 12.20 landed
- 2a5ef0983040 18.0 landed