From cec10062d823eb05697eb956235d4ec66ee65e92 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 2 Sep 2015 20:00:18 +0200 Subject: add memcasecmp and wmemcasecmp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- include/wchar.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'include/wchar.h') diff --git a/include/wchar.h b/include/wchar.h index 755b583..2b757ca 100644 --- a/include/wchar.h +++ b/include/wchar.h @@ -658,6 +658,23 @@ wchar_t* wmemdup(const wchar_t*, size_t) int wmemcmp(const wchar_t*, const wchar_t*, size_t) __GCC_ONLY(__attribute__((warn_unused_result, pure))); +#if defined(_SLIBC_SOURCE) && !defined(__PORTABLE) +/** + * Compare two memory segments alphabetically in a case insensitive manner. + * + * This is a slibc extension added because it was useful + * in implementing slibc itself. + * + * @param a A negative value is returned if this is the lesser. + * @param b A positive value is returned if this is the lesser. + * @param size The size of the segments. + * @return Zero is returned if `a` and `b` are equal, otherwise, + * see the specifications for `a` and `b`. + */ +int wmemcasecmp(const wchar_t*, const wchar_t*, size_t) + __GCC_ONLY(__attribute__((warn_unused_result, pure))); +#endif + /** * Compare two strings alphabetically in a case sensitive manner. * -- cgit v1.2.3-70-g09d2