public inbox for git@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED
@ 2026-03-19 22:37 Junio C Hamano
  2026-03-19 23:11 ` René Scharfe
  2026-03-20  7:55 ` Johannes Schindelin
  0 siblings, 2 replies; 14+ messages in thread
From: Junio C Hamano @ 2026-03-19 22:37 UTC (permalink / raw)
  To: git; +Cc: René Scharfe

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.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 compat/regcomp_enhanced.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/compat/regcomp_enhanced.c b/compat/regcomp_enhanced.c
index 84193ce53b..51e1358170 100644
--- a/compat/regcomp_enhanced.c
+++ b/compat/regcomp_enhanced.c
@@ -3,7 +3,9 @@
 
 int git_regcomp(regex_t *preg, const char *pattern, int cflags)
 {
+#ifdef REG_ENHANCED
 	if (!(cflags & REG_EXTENDED))
 		cflags |= REG_ENHANCED;
+#endif
 	return regcomp(preg, pattern, cflags);
 }
-- 
2.53.0-816-g44373249a2


^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-03-20 16:57 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox