FreeRDP
buffer.c
1 
20 #include <winpr/config.h>
21 
22 #include <winpr/crt.h>
23 
24 /* Buffer Manipulation: http://msdn.microsoft.com/en-us/library/b3893xdy/ */
25 
26 #ifndef _WIN32
27 
28 #include <string.h>
29 
30 errno_t memmove_s(void* dest, size_t numberOfElements, const void* src, size_t count)
31 {
32  if (count > numberOfElements)
33  return -1;
34 
35  memmove(dest, src, count);
36 
37  return 0;
38 }
39 
40 errno_t wmemmove_s(WCHAR* dest, size_t numberOfElements, const WCHAR* src, size_t count)
41 {
42  if (count * 2 > numberOfElements)
43  return -1;
44 
45  memmove(dest, src, count * 2);
46 
47  return 0;
48 }
49 
50 #endif