public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Schindelin <Johannes.Schindelin@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: "René Scharfe" <l.s.r@web.de>, git@vger.kernel.org
Subject: Re: [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED
Date: Fri, 20 Mar 2026 08:48:36 +0100 (CET)	[thread overview]
Message-ID: <f08f7097-fea8-6dc6-ef49-da0bd5ea3c01@gmx.de> (raw)
In-Reply-To: <3b0be017-2e6c-d1c8-0ed8-88ec4fa66e38@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]

Hi,

On Fri, 20 Mar 2026, Johannes Schindelin wrote:

> On Fri, 20 Mar 2026, Junio C Hamano wrote:
> 
> > René Scharfe <l.s.r@web.de> writes:
> > 
> > > On 3/19/26 11:37 PM, Junio C Hamano wrote:
> > >> Earlier, 54463d32 (use enhanced basic regular expressions on macOS,
> > >> 2023-01-08) started to use the REG_ENHANCED option when ERE is not
> > >> in use on macOS.  The build seems to have started failing on
> > >> macos-14 CI jobs at GitHub, however, as apparently not all the macOS
> > >> platforms have this flag defined.
> > >
> [...] my money is on a clang update in Homebrew disabling support for
> `REG_ENHANCED`. But why is `osx-meson` not affected, it uses `clang`?
> Well, there's special handling for that in `meson.build`:
> https://gitlab.com/git-scm/git/-/blob/v2.53.0/meson.build#L1347-1350
> 
>   if compiler.get_define('REG_ENHANCED', prefix: '#include <regex.h>') != ''
>     libgit_c_args += '-DUSE_ENHANCED_BASIC_REGULAR_EXPRESSIONS'
>     libgit_sources += 'compat/regcomp_enhanced.c'
>   endif

And it looks indeed as if the `osx-meson` job picks up a difference and
works around it. Last week, it detected `REG_ENHANCED`:
https://github.com/git-for-windows/git/actions/runs/22920658960/job/66517862315#step:4:168

>  Fetching value of define "REG_ENHANCED" : 0400

This week, it detects the absence:
https://github.com/git-for-windows/git/actions/runs/23325790048/job/67846594275#step:4:173

> Fetching value of define "REG_ENHANCED" : (undefined)

So there you have it. One week, the `regex.h` headers defined
`REG_ENHANCED`, the next week, they didn't.

Ciao,
Johannes

  reply	other threads:[~2026-03-20  7:48 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-19 22:37 [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED Junio C Hamano
2026-03-19 23:11 ` René Scharfe
2026-03-20  1:30   ` Junio C Hamano
2026-03-20  7:34     ` Johannes Schindelin
2026-03-20  7:48       ` Johannes Schindelin [this message]
2026-03-20  7:55 ` Johannes Schindelin
2026-03-20  8:06   ` Johannes Schindelin
2026-03-20  8:55     ` Johannes Schindelin
2026-03-20 11:12       ` René Scharfe
2026-03-20 15:12         ` Johannes Schindelin
2026-03-20 15:59           ` René Scharfe
2026-03-20 16:33         ` Junio C Hamano
2026-03-20 16:57       ` Junio C Hamano
2026-03-20 16:50   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f08f7097-fea8-6dc6-ef49-da0bd5ea3c01@gmx.de \
    --to=johannes.schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=l.s.r@web.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox