6 #if defined(HAVE_CONFIG_H) 12 #if defined(HAVE_SYS_SELECT_H) 13 #include <sys/select.h> 16 extern "C" void*
memcpy(
void* a,
const void* b,
size_t c);
29 template <
unsigned int T>
30 bool sanity_test_memcpy()
32 unsigned int memcpy_test[T];
33 unsigned int memcpy_verify[T] = {};
34 for (
unsigned int i = 0; i != T; ++i)
37 memcpy_int(memcpy_verify, memcpy_test,
sizeof(memcpy_test));
39 for (
unsigned int i = 0; i != T; ++i) {
40 if (memcpy_verify[i] != i)
46 #if defined(HAVE_SYS_SELECT_H) 51 bool sanity_test_fdelt()
56 return FD_ISSET(0, &fds);
64 #if defined(HAVE_SYS_SELECT_H) 65 if (!sanity_test_fdelt())
68 return sanity_test_memcpy<1025>();
void * memcpy_int(void *a, const void *b, size_t c)
void * memcpy(void *a, const void *b, size_t c)