]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/stkstring.h
Opt: Deleted extra newlines after failure messages
[libucw.git] / ucw / stkstring.h
index d96b72386adc703040e8db3e0e73b7f1b3882f46..62f9a514b9200fed4b6e2eb4fef8f4ebcf3ad4f1 100644 (file)
 #include <alloca.h>
 #include <string.h>
 #include <stdio.h>
-
-#ifdef CONFIG_DARWIN
-uns strnlen(const char *str, uns n);
-#endif
+#include <ucw/string.h>
 
 #define stk_strdup(s) ({ const char *_s=(s); uns _l=strlen(_s)+1; char *_x=alloca(_l); memcpy(_x, _s, _l); _x; })
 #define stk_strndup(s,n) ({ const char *_s=(s); uns _l=strnlen(_s,(n)); char *_x=alloca(_l+1); memcpy(_x, _s, _l); _x[_l]=0; _x; })