Re: [PATCH] regex: not all macOS platforms seem to have REG_ENHANCED
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 20, 2026, 16:57 UTC
- Message-ID
- <xmqq8qbmfngn.fsf@gitster.g>
- In-Reply-To
- <d340af9e-334c-4e81-e58a-fc3dea73ebdd@gmx.de>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> Work around this by setting `NO_REGEX` when `CC=clang` on Darwin, which > makes the build use Git's bundled regex implementation instead of the > system one. This sidesteps the missing `REG_ENHANCED` define entirely.
While this may make things built identically between CI environment and end-user environment, do we have to worry about what we lose by not using system supplied regex library?
If the answer is "no, we do not lose anything, and even if we do, that's miniscule loss that does not matter", then I like the approach.
I wonder if we could do something like this instead?
ifeq ($(CC),clang) CC := /usr/bin/clang eneidf
as was suggested in one of the downthread messages by René?
Thanks.