Hi. Paul. > diff --git a/lib/regex_internal.h b/lib/regex_internal.h > index 13e15e21e..6d436fde1 100644 > --- a/lib/regex_internal.h > +++ b/lib/regex_internal.h > @@ -141,6 +141,9 @@ > #ifndef SSIZE_MAX > # define SSIZE_MAX ((ssize_t) (SIZE_MAX / 2)) > #endif > +#ifndef ULONG_WIDTH > +# define ULONG_WIDTH (CHAR_BIT * sizeof (unsigned long int)) > +#endif > > /* The type of indexes into strings. This is signed, not size_t, > since the API requires indexes to fit in regoff_t anyway, and using
This change is problematic. Further on in regex_internal.h we have #define BITSET_WORD_BITS ULONG_WIDTH And then in places in regcomp.c BITSET_WORD_BITS is tested in several #if/#elif statements. Thus on systems that don't provide ULONG_WIDTH, we end up with expressions in #if/#elif that wants to use sizeof. Needless to say, this fails spectactularly. :-( Can you revert to the original code or to something else that will compile on systems where ULONG_WIDTH is not defined? Much thanks, Arnold