X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmbscasestr.c;h=7a3466356b61204a036c489d65435e65e80627f5;hb=5a21606b0d57082670bd060d169492c2f3a410f2;hp=a136b21d8ca6d26ef577dd92b34fd58376e0bead;hpb=5c26c7d4ad5c61653975b68a38a59e2bec103e39;p=gnulib.git diff --git a/lib/mbscasestr.c b/lib/mbscasestr.c index a136b21d8..7a3466356 100644 --- a/lib/mbscasestr.c +++ b/lib/mbscasestr.c @@ -25,9 +25,7 @@ #include /* for NULL, in case a nonstandard string.h lacks it */ #include "malloca.h" -#if HAVE_MBRTOWC -# include "mbuiter.h" -#endif +#include "mbuiter.h" #define TOLOWER(Ch) (isupper (Ch) ? tolower (Ch) : (Ch)) @@ -35,7 +33,6 @@ #define CANON_ELEMENT(c) TOLOWER (c) #include "str-kmp.h" -#if HAVE_MBRTOWC /* Knuth-Morris-Pratt algorithm. See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm Return a boolean indicating success: @@ -192,7 +189,6 @@ knuth_morris_pratt_multibyte (const char *haystack, const char *needle, freea (memory); return true; } -#endif /* Find the first occurrence of the character string NEEDLE in the character string HAYSTACK, using case-insensitive comparison. @@ -206,7 +202,6 @@ mbscasestr (const char *haystack, const char *needle) - haystack may be very long, and a match of needle found early, - needle may be very long, and not even a short initial segment of needle may be found in haystack. */ -#if HAVE_MBRTOWC if (MB_CUR_MAX > 1) { mbui_iterator_t iter_needle; @@ -319,7 +314,6 @@ mbscasestr (const char *haystack, const char *needle) return (char *) haystack; } else -#endif { if (*needle != '\0') {