diff options
Diffstat (limited to 'ext/pcre/pcrelib/pcre_newline.c')
-rw-r--r-- | ext/pcre/pcrelib/pcre_newline.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/pcre/pcrelib/pcre_newline.c b/ext/pcre/pcrelib/pcre_newline.c index ae66c730f6..db02a8cf20 100644 --- a/ext/pcre/pcrelib/pcre_newline.c +++ b/ext/pcre/pcrelib/pcre_newline.c @@ -47,6 +47,10 @@ and NLTYPE_ANY. The full list of Unicode newline characters is taken from http://unicode.org/unicode/reports/tr18/. */ +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + #include "pcre_internal.h" @@ -124,12 +128,16 @@ _pcre_was_newline(const uschar *ptr, int type, const uschar *startptr, { int c; ptr--; +#ifdef SUPPORT_UTF8 if (utf8) { BACKCHAR(ptr); GETCHAR(c, ptr); } else c = *ptr; +#else /* no UTF-8 support */ +c = *ptr; +#endif /* SUPPORT_UTF8 */ if (type == NLTYPE_ANYCRLF) switch(c) { |