summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/locale/strcasecmp_l.c6
-rw-r--r--src/locale/strncasecmp_l.c7
-rw-r--r--src/string/strcasecmp.c8
-rw-r--r--src/string/strncasecmp.c8
4 files changed, 16 insertions, 13 deletions
diff --git a/src/locale/strcasecmp_l.c b/src/locale/strcasecmp_l.c
deleted file mode 100644
index ca805430..00000000
--- a/src/locale/strcasecmp_l.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <strings.h>
-
-int strcasecmp_l(const char *l, const char *r, locale_t loc)
-{
- return strcasecmp(l, r);
-}
diff --git a/src/locale/strncasecmp_l.c b/src/locale/strncasecmp_l.c
deleted file mode 100644
index af33ada6..00000000
--- a/src/locale/strncasecmp_l.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <strings.h>
-#include <locale.h>
-
-int strncasecmp_l(const char *l, const char *r, size_t n, locale_t loc)
-{
- return strncasecmp(l, r, n);
-}
diff --git a/src/string/strcasecmp.c b/src/string/strcasecmp.c
index 02fd5f8c..3cd5f2d0 100644
--- a/src/string/strcasecmp.c
+++ b/src/string/strcasecmp.c
@@ -1,5 +1,6 @@
#include <strings.h>
#include <ctype.h>
+#include "libc.h"
int strcasecmp(const char *_l, const char *_r)
{
@@ -7,3 +8,10 @@ int strcasecmp(const char *_l, const char *_r)
for (; *l && *r && (*l == *r || tolower(*l) == tolower(*r)); l++, r++);
return tolower(*l) - tolower(*r);
}
+
+int __strcasecmp_l(const char *l, const char *r, locale_t loc)
+{
+ return strcasecmp(l, r);
+}
+
+weak_alias(__strcasecmp_l, strcasecmp_l);
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 <strings.h>
#include <ctype.h>
+#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);