blob: 2a7c19dee6ae3dd2633b0d6356c416d6f7dc805f [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001/*
2 * Copyright (C) 2002 Manuel Novoa III
3 * Copyright (C) 2000-2005 Erik Andersen <andersen@uclibc.org>
4 *
5 * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
6 */
7
8#include "_string.h"
9
10#ifdef WANT_WIDE
11# define Wmemset wmemset
12#else
13# undef memset
14# define Wmemset memset
15#endif
16
17Wvoid *Wmemset(Wvoid *s, Wint c, size_t n)
18{
19 register Wuchar *p = (Wuchar *) s;
20
21 while (n) {
22 *p++ = (Wuchar) c;
23 --n;
24 }
25
26 return s;
27}
28
29#ifndef WANT_WIDE
30libc_hidden_def(memset)
31#endif