Remove HAVE_MBRTOWC conditionals. Use mbrtowc unconditionally.
[gnulib.git] / lib / mbsnlen.c
index fe4e39e..78c751f 100644 (file)
@@ -1,5 +1,5 @@
 /* Counting the multibyte characters in a string.
-   Copyright (C) 2007 Free Software Foundation, Inc.
+   Copyright (C) 2007-2008 Free Software Foundation, Inc.
    Written by Bruno Haible <bruno@clisp.org>, 2007.
 
    This program is free software: you can redistribute it and/or modify
 
 #include <stdlib.h>
 
-#if HAVE_MBRTOWC
-# include "mbiter.h"
-#endif
+#include "mbiter.h"
 
 /* Return the number of multibyte characters in the character string starting
    at STRING and ending at STRING + LEN.  */
 size_t
 mbsnlen (const char *string, size_t len)
 {
-#if HAVE_MBRTOWC
   if (MB_CUR_MAX > 1)
     {
       size_t count;
@@ -44,6 +41,5 @@ mbsnlen (const char *string, size_t len)
       return count;
     }
   else
-#endif
     return len;
 }