]> git.proxmox.com Git - mirror_edk2.git/blobdiff - StdLib/LibC/String/Copying.c
Add device abstraction code for the UEFI Console and UEFI Shell-based file systems.
[mirror_edk2.git] / StdLib / LibC / String / Copying.c
index 2d5200e3c5e7e070a0718da0418707c56b2efbea..18498d6f8783c2efd9e075b99d45777de30b2d4c 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
     Copying Functions for <string.h>.\r
 \r
-    Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>\r
+    Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>\r
     This program and the accompanying materials are licensed and made available under\r
     the terms and conditions of the BSD License that accompanies this distribution.\r
     The full text of the license may be found at\r
@@ -10,8 +10,6 @@
     THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
     WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 **/\r
-//#include  <sys/EfiCdefs.h>\r
-\r
 #include  <Uefi.h>\r
 #include  <Library/BaseLib.h>\r
 #include  <Library/BaseMemoryLib.h>\r
 #include  <stdlib.h>\r
 #include  <string.h>\r
 \r
+/** Do not define memcpy for IPF+GCC builds.\r
+    For IPF, using a GCC compiler, the memcpy function is converted to\r
+    CopyMem by objcpy during build.\r
+**/\r
+#if  !(defined(MDE_CPU_IPF) && defined(__GNUC__))\r
 /** The memcpy function copies n characters from the object pointed to by s2\r
     into the object pointed to by s1.\r
 \r
@@ -33,6 +36,7 @@ memcpy(void * __restrict s1, const void * __restrict s2, size_t n)
 {\r
   return CopyMem( s1, s2, n);\r
 }\r
+#endif  /* !(defined(MDE_CPU_IPF) && defined(__GCC)) */\r
 \r
 /** The memmove function copies n characters from the object pointed to by s2\r
     into the object pointed to by s1. Copying takes place as if the n\r