X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmbsstr.c;h=c84946b630740bd06944ecc36eed1eba37b4defc;hb=fa3486514bd8f15f8eb4c49821d0356b52e5a335;hp=35fd02b544f4f1aae6e59a691e46372974d9f4a9;hpb=5c26c7d4ad5c61653975b68a38a59e2bec103e39;p=gnulib.git diff --git a/lib/mbsstr.c b/lib/mbsstr.c index 35fd02b54..c84946b63 100644 --- a/lib/mbsstr.c +++ b/lib/mbsstr.c @@ -24,15 +24,12 @@ #include /* for NULL, in case a nonstandard string.h lacks it */ #include "malloca.h" -#if HAVE_MBRTOWC -# include "mbuiter.h" -#endif +#include "mbuiter.h" /* Knuth-Morris-Pratt algorithm. */ #define CANON_ELEMENT(c) 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: @@ -178,7 +175,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. Return NULL if NEEDLE is not found in HAYSTACK. */ @@ -190,7 +186,6 @@ mbsstr (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; @@ -291,7 +286,6 @@ mbsstr (const char *haystack, const char *needle) return (char *) haystack; } else -#endif { if (*needle != '\0') {