# HG changeset patch # User Mychaela Falconia # Date 1477696501 0 # Node ID 659fa1a26269d79d27d5bc15340b8dd0775ca25e # Parent 8dc062c6359b00822ff3bef52dce33e8afb2d91b target-utils/libc: non-optimized C implementation of memset for the sake of completeness and compliance diff -r 8dc062c6359b -r 659fa1a26269 target-utils/libc/Makefile --- a/target-utils/libc/Makefile Fri Oct 28 23:02:44 2016 +0000 +++ b/target-utils/libc/Makefile Fri Oct 28 23:15:01 2016 +0000 @@ -4,8 +4,9 @@ AR= arm-elf-ar RANLIB= arm-elf-ranlib -OBJS= atoi.o bzero.o ctype_.o index.o memcpy.o memcpy16.o memcpy32.o rindex.o\ - strcasecmp.o strcat.o strcmp.o strcpy.o strncat.o strncmp.o strncpy.o +OBJS= atoi.o bzero.o ctype_.o index.o memcpy.o memcpy16.o memcpy32.o memset.o\ + rindex.o strcasecmp.o strcat.o strcmp.o strcpy.o strncat.o strncmp.o \ + strncpy.o all: libc.a diff -r 8dc062c6359b -r 659fa1a26269 target-utils/libc/memset.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/target-utils/libc/memset.c Fri Oct 28 23:15:01 2016 +0000 @@ -0,0 +1,14 @@ +#include + +u_char * +memset(buf, c, n) + u_char *buf; + int c; + unsigned n; +{ + u_char *p = buf; + + for (; n; n--) + *p++ = c; + return buf; +}