From: Kevin McCarthy Date: Sun, 8 Apr 2018 22:37:09 +0000 (-0700) Subject: Rename _regex.h to _mutt_regex.h to avoid name collision on Macs. X-Git-Tag: mutt-1-9-5-rel~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a550d535b3aafecac7dd8906c73311fd49802804;p=mutt Rename _regex.h to _mutt_regex.h to avoid name collision on Macs. On Macs, includes <_regex.h>. Because Mutt defines '-I .' during compilation, our bundled version of _regex.h was being used instead of the system one. I have no idea how it managed to work before, but starting in Xcode 9.3, the differences in struct size and fields started to produce a crash and other strange behavior. The real issue is our use of '-I .' during compilation, which allows our local headers to override system ones. An easier fix for now is to rename the header. Many thanks to Charles Diza, Christian Ebert, and Fabian Groffen for their help trying things out and helping to debug the problem. Also, a huge thanks to Steve Karmeinsky for allowing me to ssh in to his Mac so I could track down the underlying issue. --- diff --git a/Makefile.am b/Makefile.am index cd547d78..1c2e9a78 100644 --- a/Makefile.am +++ b/Makefile.am @@ -71,7 +71,7 @@ EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \ mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \ mx.h pager.h pgp.h pop.h protos.h rfc1524.h rfc2047.h \ rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \ - _regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ + _mutt_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \ mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \ README.SSL smime.h group.h \ muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \ diff --git a/_regex.h b/_mutt_regex.h similarity index 100% rename from _regex.h rename to _mutt_regex.h diff --git a/mutt_regex.h b/mutt_regex.h index 1cc4a3e2..c89a2f43 100644 --- a/mutt_regex.h +++ b/mutt_regex.h @@ -24,7 +24,7 @@ #define MUTT_REGEX_H #ifdef USE_GNU_REGEX -#include "_regex.h" +#include "_mutt_regex.h" #else #include #endif diff --git a/regex.c b/regex.c index fbec647e..cfbfb58f 100644 --- a/regex.c +++ b/regex.c @@ -212,7 +212,7 @@ init_syntax_once () /* Changed to fit into mutt - tlr, 1999-01-06 */ -#include "_regex.h" +#include "_mutt_regex.h" /* isalpha etc. are used for the character classes. */ #include