diff --git a/src/regex/regc_nfa.c b/src/regex/regc_nfa.c index 9881cd4304..5f65c8d83a 100644 --- a/src/regex/regc_nfa.c +++ b/src/regex/regc_nfa.c @@ -972,6 +972,13 @@ struct arc *con; ^ #def COMPATIBLE 3 // compatible but not satisfied yet ^ static int combine(struct arc *, struct arc *); */ + +/* FIXME Required for CW 8 on Mac since it's not in limits.h */ +#ifndef __CHAR_BIT__ +#define __CHAR_BIT__ 8 +#endif + + static int combine(con, a) struct arc *con; diff --git a/src/regex/rege_dfa.c b/src/regex/rege_dfa.c index 313892cc8f..843c5d31b2 100644 --- a/src/regex/rege_dfa.c +++ b/src/regex/rege_dfa.c @@ -257,6 +257,12 @@ struct dfa *d; ^ static struct dfa *newdfa(struct vars *, struct cnfa *, ^ struct colormap *, struct smalldfa *); */ + +/* FIXME Required for CW 8 on Mac since it's not in limits.h */ +#ifndef __CHAR_BIT__ +#define __CHAR_BIT__ 8 +#endif + static struct dfa * newdfa(v, cnfa, cm, small) struct vars *v; diff --git a/src/regex/regguts.h b/src/regex/regguts.h index 36e5092367..be5041d920 100644 --- a/src/regex/regguts.h +++ b/src/regex/regguts.h @@ -37,8 +37,6 @@ */ #include "regcustom.h" - - /* * Things that regcustom.h might override. */