From: Junio C Hamano Date: Fri, 20 Mar 2026 16:50:28 GMT Subject: Re: [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED Message-ID: In-Reply-To: <6636e7d2-7a1d-0108-2e62-af27a3ae3cf3@gmx.de> Johannes Schindelin writes: > While this lets the build pass, it _does_ change behavior. Where > previously, EREs were enforced, now BREs are silently enforced. Enhanced is not about ERE/BRE but yes, you're right. A build that does not support REG_ENHANCED (due to the lack of definition in the header) would compile but without enhanced features like \b, so the "patch" above would not something I want to apply and blamed by macOS users for X-<. > So it might be desirable to instead imitate what `meson.build` does, > namely define `USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS` on macOS when > compiling with `clang`. > > But that should already be the case: > https://gitlab.com/git-scm/git/-/blob/v2.53.0/config.mak.uname#L151 > >> ifeq ($(uname_S),Darwin) >> [...] >> USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS = YesPlease > > So: hmm. Hmm, indeed.