]>
Commit | Line | Data |
---|---|---|
1 | /** @file\r | |
2 | Intrinsic Memory Routines Wrapper Implementation for OpenSSL-based\r | |
3 | Cryptographic Library.\r | |
4 | \r | |
5 | Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r | |
6 | SPDX-License-Identifier: BSD-2-Clause-Patent\r | |
7 | \r | |
8 | **/\r | |
9 | \r | |
10 | #include <Base.h>\r | |
11 | #include <Library/BaseMemoryLib.h>\r | |
12 | \r | |
13 | #if defined(__clang__) && !defined(__APPLE__)\r | |
14 | \r | |
15 | /* Copies bytes between buffers */\r | |
16 | static __attribute__((__used__))\r | |
17 | void * __memcpy (void *dest, const void *src, unsigned int count)\r | |
18 | {\r | |
19 | return CopyMem (dest, src, (UINTN)count);\r | |
20 | }\r | |
21 | __attribute__((__alias__("__memcpy")))\r | |
22 | void * memcpy (void *dest, const void *src, unsigned int count);\r | |
23 | \r | |
24 | #else\r | |
25 | /* Copies bytes between buffers */\r | |
26 | void * memcpy (void *dest, const void *src, unsigned int count)\r | |
27 | {\r | |
28 | return CopyMem (dest, src, (UINTN)count);\r | |
29 | }\r | |
30 | #endif\r |