X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fregex.c;h=d16bd60381bdf82be7c2203b1bde3916c9de014d;hb=140b7a20b7c376347dac834c95baee91af125394;hp=74eaa2dcc9bb44280068be0540ad9ab8f1cd19f5;hpb=3fdc98be03fb6c8b4a3ee0630131f3c4701dacb4;p=gnulib.git diff --git a/lib/regex.c b/lib/regex.c index 74eaa2dcc..d16bd6038 100644 --- a/lib/regex.c +++ b/lib/regex.c @@ -49,9 +49,12 @@ # include #endif +#define WIDE_CHAR_SUPPORT \ + defined _LIBC || (HAVE_WCTYPE_H && HAVE_WCHAR_H && HAVE_BTOWC) + /* For platform which support the ISO C amendement 1 functionality we support user defined character classes. */ -#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) +#if WIDE_CHAR_SUPPORT # include # include #endif @@ -1685,7 +1688,7 @@ typedef struct } \ } -#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) +#if WIDE_CHAR_SUPPORT /* The GNU C library provides support for user-defined character classes and the functions from ISO C amendement 1. */ # ifdef CHARCLASS_NAME_MAX @@ -2185,7 +2188,7 @@ regex_compile (pattern, size, syntax, bufp) the leading `:' and `[' (but set bits for them). */ if (c == ':' && *p == ']') { -#if defined _LIBC || (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H) +#if WIDE_CHAR_SUPPORT boolean is_lower = STREQ (str, "lower"); boolean is_upper = STREQ (str, "upper"); wctype_t wt;