Re: PostgreSQL does not compile on macOS SDK 15.0

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Aleksander Alekseev <aleksander(at)timescale(dot)com>, Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Stan Hu <stanhu(at)gmail(dot)com>
Subject: Re: PostgreSQL does not compile on macOS SDK 15.0
Date: 2024-07-04 06:08:56
Message-ID: CA+hUKGJixxm53QNMLOQAdyrWHWPJ+vT7nrdcFcmy_GihAfAnDQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jul 1, 2024 at 2:06 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> > I don't have any great ideas about what to do about this.
> > Cybersquatting system facilities is a messy business, so maybe the
> > proposed grotty solution is actually appropriate! We did bring this
> > duelling Henry Spencers problem upon ourselves. Longer term,
> > pg_regex_t seems to make a lot of sense, except IIUC we want to keep
> > this code in sync with TCL so perhaps a configurable prefix could be
> > done with macrology?
>
> Yeah. I'd do pg_regex_t in a minute except that it'd break existing
> extensions using our facilities. However, your mention of macrology
> stirred an idea: could we have our regex/regex.h intentionally
> #include the system regex.h and then do
> #define regex_t pg_regex_t
> ? If that works, our struct is really pg_regex_t, but we don't have
> to change any existing calling code. It might get a bit messy
> undef'ing and redef'ing all the other macros in regex/regex.h, but
> I think we could make it fly without any changes in other files.

Good idea. Here's an attempt at that.

I don't have a Mac with beta SDK 15 yet, but I think this should work?

Attachment Content-Type Size
v1-0001-Cope-with-regex.h-name-clashes.patch text/x-patch 5.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Masahiko Sawada 2024-07-04 06:51:48 Re: Conflict Detection and Resolution
Previous Message Tatsuo Ishii 2024-07-04 05:07:47 Re: Fix a comment on PQcancelErrorMessage