From f63c4fd91b8483c7d4364046fd6ef2d2679dd63a Mon Sep 17 00:00:00 2001 From: schwarze <> Date: Tue, 5 Sep 2017 03:16:14 +0000 Subject: New POSIX xlocale implementation written from scratch. Complete in the sense that all POSIX *locale(3) and *_l(3) functions are included, but in OpenBSD, we of course only really care about LC_CTYPE and we only support ASCII and UTF-8. With important help from kettenis@, guenther@, and jca@. Repeated testing in ports bulk builds by naddy@. Additional testing by jca@, sebastia@, dcoppa@, and others. OK kettenis@ dcoppa@, and guenther@ on an earlier version. Riding guenther@'s libc/librthread major bump. --- src/lib/libc/string/strcasecmp_l.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/lib/libc/string/strcasecmp_l.c (limited to 'src/lib/libc/string/strcasecmp_l.c') diff --git a/src/lib/libc/string/strcasecmp_l.c b/src/lib/libc/string/strcasecmp_l.c new file mode 100644 index 0000000000..a9543dda11 --- /dev/null +++ b/src/lib/libc/string/strcasecmp_l.c @@ -0,0 +1,21 @@ +/* $OpenBSD: strcasecmp_l.c,v 1.1 2017/09/05 03:16:13 schwarze Exp $ */ +/* + * Written in 2017 by Ingo Schwarze . + * Released into the public domain. + */ + +#include + +int +strcasecmp_l(const char *s1, const char *s2, + locale_t locale __attribute__((__unused__))) +{ + return strcasecmp(s1, s2); +} + +int +strncasecmp_l(const char *s1, const char *s2, size_t n, + locale_t locale __attribute__((__unused__))) +{ + return strncasecmp(s1, s2, n); +} -- cgit v1.2.3-55-g6feb