Index: uspace/lib/c/generic/str.c
===================================================================
--- uspace/lib/c/generic/str.c	(revision 059a8e4b4f97d287fdb888636dac0f59bfafa019)
+++ uspace/lib/c/generic/str.c	(revision c8d0f9e51c2c5a2a57ccd5bd36d0254ea8199cf4)
@@ -46,4 +46,11 @@
 #include <mem.h>
 #include <str.h>
+
+/** Check the condition if wchar_t is signed */
+#ifdef WCHAR_IS_UNSIGNED
+	#define WCHAR_SIGNED_CHECK(cond)  (true)
+#else
+	#define WCHAR_SIGNED_CHECK(cond)  (cond)
+#endif
 
 /** Byte mask consisting of lowest @n bits (out of 8) */
@@ -399,5 +406,5 @@
 bool ascii_check(wchar_t ch)
 {
-	if ((ch >= 0) && (ch <= 127))
+	if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 127))
 		return true;
 	
@@ -412,5 +419,5 @@
 bool chr_check(wchar_t ch)
 {
-	if ((ch >= 0) && (ch <= 1114111))
+	if (WCHAR_SIGNED_CHECK(ch >= 0) && (ch <= 1114111))
 		return true;
 	
@@ -513,4 +520,5 @@
  * @param count Size of the destination buffer (must be > 0).
  * @param src   Source string.
+ *
  */
 void str_cpy(char *dest, size_t size, const char *src)
@@ -545,4 +553,5 @@
  * @param src   Source string.
  * @param n     Maximum number of bytes to read from @a src.
+ *
  */
 void str_ncpy(char *dest, size_t size, const char *src, size_t n)
