]>
Commit | Line | Data |
---|---|---|
e58427e3 PB |
1 | //------------------------------------------------------------------------------\r |
2 | //\r | |
3 | // Copyright (c) 2017, Pete Batard. All rights reserved.<BR>\r | |
4 | //\r | |
5 | // This program and the accompanying materials are licensed and made\r | |
6 | // available under the terms and conditions of the BSD License which\r | |
7 | // accompanies this distribution. The full text of the license may be\r | |
8 | // found at http://opensource.org/licenses/bsd-license.php\r | |
9 | //\r | |
10 | // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR\r | |
12 | // IMPLIED.\r | |
13 | //\r | |
14 | //------------------------------------------------------------------------------\r | |
15 | \r | |
16 | #if defined(_M_ARM64)\r | |
17 | typedef unsigned __int64 size_t;\r | |
18 | #else\r | |
19 | typedef unsigned __int32 size_t;\r | |
20 | #endif\r | |
21 | \r | |
22 | void* memset(void *, int, size_t);\r | |
23 | #pragma intrinsic(memset)\r | |
24 | #pragma function(memset)\r | |
25 | void *memset(void *s, int c, size_t n)\r | |
26 | {\r | |
27 | unsigned char *d = s;\r | |
28 | \r | |
29 | while (n--)\r | |
30 | *d++ = (unsigned char)c;\r | |
31 | \r | |
32 | return s;\r | |
33 | }\r |