scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

memcpy.c (190B)


      1 #include <string.h>
      2 
      3 #undef memcpy
      4 
      5 void *
      6 memcpy(void *restrict s1, const void *restrict s2, size_t n)
      7 {
      8 	char *d = s1;
      9 	const char *s = s2;
     10 
     11 	while (n-- > 0)
     12 		*d++ = *s++;
     13 
     14 	return s1;
     15 }