From 7424ac58b1f47adb03de55de5998c530aee91551 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 2 Jul 2014 21:38:54 -0400 Subject: consolidate str[n]casecmp_l into str[n]casecmp source files this is mainly done for consistency with the ctype functions and to declutter the src/locale directory. --- src/string/strncasecmp.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/string/strncasecmp.c') diff --git a/src/string/strncasecmp.c b/src/string/strncasecmp.c index 24659721..3af53008 100644 --- a/src/string/strncasecmp.c +++ b/src/string/strncasecmp.c @@ -1,5 +1,6 @@ #include #include +#include "libc.h" int strncasecmp(const char *_l, const char *_r, size_t n) { @@ -8,3 +9,10 @@ int strncasecmp(const char *_l, const char *_r, size_t n) for (; *l && *r && n && (*l == *r || tolower(*l) == tolower(*r)); l++, r++, n--); return tolower(*l) - tolower(*r); } + +int __strncasecmp_l(const char *l, const char *r, size_t n, locale_t loc) +{ + return strncasecmp(l, r, n); +} + +weak_alias(__strncasecmp_l, strncasecmp_l); -- cgit v1.2.1