diff options
author | Junio C Hamano <gitster@pobox.com> | 2023-01-23 21:39:51 (GMT) |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-01-23 21:39:51 (GMT) |
commit | 5427bb4893e29a9502bbee5aed84c3b26e1a4e15 (patch) | |
tree | 9e8a02d927e20bc6259919e42f338d82cbca689d /Makefile | |
parent | cd37c45acf8170aa80a4d7bd44ea5fc8241047f2 (diff) | |
parent | 54463d32ef6798c772c8bbf69b2c1897a854db9f (diff) | |
download | git-5427bb4893e29a9502bbee5aed84c3b26e1a4e15.zip git-5427bb4893e29a9502bbee5aed84c3b26e1a4e15.tar.gz git-5427bb4893e29a9502bbee5aed84c3b26e1a4e15.tar.bz2 |
Merge branch 'rs/use-enhanced-bre-on-macos'
Newer regex library macOS stopped enabling GNU-like enhanced BRE,
where '\(A\|B\)' works as alternation, unless explicitly asked with
the REG_ENHANCED flag. "git grep" now can be compiled to do so, to
retain the old behaviour.
* rs/use-enhanced-bre-on-macos:
use enhanced basic regular expressions on macOS
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -289,6 +289,10 @@ include shared.mak # Define NO_REGEX if your C library lacks regex support with REG_STARTEND # feature. # +# Define USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS if your C library provides +# the flag REG_ENHANCED and you'd like to use it to enable enhanced basic +# regular expressions. +# # Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the # user. # @@ -2037,6 +2041,11 @@ endif ifdef NO_REGEX COMPAT_CFLAGS += -Icompat/regex COMPAT_OBJS += compat/regex/regex.o +else +ifdef USE_ENHANCED_BASIC_REGULAR_EXPRESSIONS + COMPAT_CFLAGS += -DUSE_ENHANCED_BASIC_REGULAR_EXPRESSIONS + COMPAT_OBJS += compat/regcomp_enhanced.o +endif endif ifdef NATIVE_CRLF BASIC_CFLAGS += -DNATIVE_CRLF |