[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[patches] [PATCH] Fix alternative regex implementation



Hello,

The attached obvious patch fixes alternative regex implementation to handle absence of wide char support. This fixes building of EGLIBC in configuration

OPTION_POSIX_C_LANG_WIDE_CHAR = n
OPTION_POSIX_REGEXP = y
OPTION_POSIX_REGEXP_GLIBC = n

Committed as obvious.

Thanks,

--
Maxim
2008-12-24  Maxim Kuvyrkov  <maxim@xxxxxxxxxxxxxxxx>

	* posix/xregex.c: Handle absence of wide char support.
Index: posix/xregex.c
===================================================================
--- posix/xregex.c	(revision 7541)
+++ posix/xregex.c	(working copy)
@@ -51,7 +51,7 @@
 
 /* For platform which support the ISO C amendement 1 functionality we
    support user defined character classes.  */
-# if defined _LIBC || WIDE_CHAR_SUPPORT
+# if WIDE_CHAR_SUPPORT
 /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.  */
 #  include <wchar.h>
 #  include <wctype.h>
@@ -2174,7 +2174,7 @@ typedef struct
   }
 
 # ifndef DEFINED_ONCE
-#  if defined _LIBC || WIDE_CHAR_SUPPORT
+#  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
@@ -3223,7 +3223,7 @@ PREFIX(regex_compile) (const char *ARG_P
                        the leading `:' and `[' (but set bits for them).  */
                     if (c == ':' && *p == ']')
                       {
-# if defined _LIBC || WIDE_CHAR_SUPPORT
+# if WIDE_CHAR_SUPPORT
                         boolean is_lower = STREQ (str, "lower");
                         boolean is_upper = STREQ (str, "upper");
 			wctype_t wt;