Jeff Thompson | 47eecfc | 2013-07-07 22:56:46 -0700 | [diff] [blame^] | 1 | /** |
| 2 | * @author: Jeff Thompson |
| 3 | * See COPYING for copyright and distribution information. |
Jeff Thompson | f418fe0 | 2013-06-27 17:28:55 -0700 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include "ndn_memory.h" |
| 7 | |
| 8 | #if !HAVE_MEMCPY |
| 9 | void ndn_memcpy(unsigned char *dest, unsigned char *src, unsigned int len) |
| 10 | { |
| 11 | unsigned int i; |
| 12 | |
| 13 | for (i = 0; i < len; i++) |
| 14 | dest[i] = src[i]; |
| 15 | } |
Jeff Thompson | 2275e60 | 2013-06-28 22:24:47 -0700 | [diff] [blame] | 16 | #else |
| 17 | int ndn_memcpy_stub_to_avoid_empty_file_warning = 0; |
Jeff Thompson | f418fe0 | 2013-06-27 17:28:55 -0700 | [diff] [blame] | 18 | #endif |
| 19 | |
| 20 | #if !HAVE_MEMSET |
| 21 | void ndn_memset(unsigned char *dest, int val, unsigned int len) |
| 22 | { |
| 23 | unsigned int i; |
| 24 | |
| 25 | for (i = 0; i < len; i++) |
| 26 | dest[i] = (unsigned char)val; |
| 27 | } |
Jeff Thompson | 2275e60 | 2013-06-28 22:24:47 -0700 | [diff] [blame] | 28 | #else |
| 29 | int ndn_memset_stub_to_avoid_empty_file_warning = 0; |
Jeff Thompson | f418fe0 | 2013-06-27 17:28:55 -0700 | [diff] [blame] | 30 | #endif |