git/list[1] front-page[2] threads[3] people[4] search[5] about
wed 2026-10-07 16:55 UTC

Re: [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Mar 20, 2026, 07:48 UTC
Message-ID
<f08f7097-fea8-6dc6-ef49-da0bd5ea3c01@gmx.de>
In-Reply-To
<3b0be017-2e6c-d1c8-0ed8-88ec4fa66e38@gmx.de>
Hi,
On Fri, 20 Mar 2026, Johannes Schindelin wrote:
Show 20 quoted lines
> 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

Previous: Johannes SchindelinNext: Johannes Schindelin
Message 5 of 14 in “regex: not all macOS platforms seem to have REG_ENHANCED”
  1. regex: not all macOS platforms seem to have REG_ENHANCEDJunio C Hamano, Mar 19, 2026
  2. René ScharfeMar 19, 2026
  3. Junio C HamanoMar 20, 2026
  4. Johannes SchindelinMar 20, 2026
  5. Johannes SchindelinMar 20, 2026
  6. Johannes SchindelinMar 20, 2026
  7. Johannes SchindelinMar 20, 2026
  8. Johannes SchindelinMar 20, 2026
  9. René ScharfeMar 20, 2026
  10. Johannes SchindelinMar 20, 2026
  11. René ScharfeMar 20, 2026
  12. Junio C HamanoMar 20, 2026
  13. Junio C HamanoMar 20, 2026
  14. Junio C HamanoMar 20, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.