Jeff Thompson | f418fe0 | 2013-06-27 17:28:55 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Author: Jeff Thompson |
| 3 | * |
| 4 | * BSD license, See the LICENSE file for more information. |
| 5 | */ |
| 6 | |
| 7 | #include "ndn_memory.h" |
| 8 | |
| 9 | #if !HAVE_MEMCPY |
| 10 | void ndn_memcpy(unsigned char *dest, unsigned char *src, unsigned int len) |
| 11 | { |
| 12 | unsigned int i; |
| 13 | |
| 14 | for (i = 0; i < len; i++) |
| 15 | dest[i] = src[i]; |
| 16 | } |
| 17 | #endif |
| 18 | |
| 19 | #if !HAVE_MEMSET |
| 20 | void ndn_memset(unsigned char *dest, int val, unsigned int len) |
| 21 | { |
| 22 | unsigned int i; |
| 23 | |
| 24 | for (i = 0; i < len; i++) |
| 25 | dest[i] = (unsigned char)val; |
| 26 | } |
| 27 | #endif |