2 * Copyright (C) 2002 Manuel Novoa III
3 * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
11 # define Wmemchr wmemchr
13 # define Wmemchr memchr
16 libc_hidden_proto(Wmemchr)
18 Wvoid *Wmemchr(const Wvoid *s, Wint c, size_t n)
20 register const Wuchar *r = (const Wuchar *) s;
22 /* bcc can optimize the counter if it thinks it is a pointer... */
23 register const char *np = (const char *) n;
29 if (*r == ((Wuchar)c)) {
30 return (Wvoid *) r; /* silence the warning */
40 libc_hidden_def(Wmemchr)