From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- libiberty/memset.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 libiberty/memset.c (limited to 'libiberty/memset.c') diff --git a/libiberty/memset.c b/libiberty/memset.c new file mode 100644 index 000000000..476668961 --- /dev/null +++ b/libiberty/memset.c @@ -0,0 +1,26 @@ +/* memset + This implementation is in the public domain. */ + +/* + +@deftypefn Supplemental void* memset (void *@var{s}, int @var{c}, @ + size_t @var{count}) + +Sets the first @var{count} bytes of @var{s} to the constant byte +@var{c}, returning a pointer to @var{s}. + +@end deftypefn + +*/ + +#include +#include + +PTR +memset (PTR dest, register int val, register size_t len) +{ + register unsigned char *ptr = (unsigned char*)dest; + while (len-- > 0) + *ptr++ = val; + return dest; +} -- cgit v1.2.3