From: Joseph Myers Date: Tue, 17 Feb 2015 16:19:56 +0000 (+0000) Subject: Avoid dependence on libc headers in nvptx realloc. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77d10a1b208d0e78ee638a49952276be9b830db4;p=gcc.git Avoid dependence on libc headers in nvptx realloc. * config/nvptx/realloc.c: Include instead of and . (__nvptx_realloc): Call __builtin_memcpy instead of memcpy. From-SVN: r220764 --- diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 2c9b6e86d08..0bff7ef3b06 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,9 @@ +2015-02-17 Joseph Myers + + * config/nvptx/realloc.c: Include instead of + and . + (__nvptx_realloc): Call __builtin_memcpy instead of memcpy. + 2015-02-10 Rainer Emrich PR gcov-profile/61889 diff --git a/libgcc/config/nvptx/realloc.c b/libgcc/config/nvptx/realloc.c index 5b4a9a41698..136f0101f6c 100644 --- a/libgcc/config/nvptx/realloc.c +++ b/libgcc/config/nvptx/realloc.c @@ -21,8 +21,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see . */ -#include -#include +#include #include "nvptx-malloc.h" void * @@ -44,7 +43,7 @@ __nvptx_realloc (void *ptr, size_t newsz) oldsz = *sp; } if (oldsz != 0) - memcpy (newptr, ptr, oldsz > newsz ? newsz : oldsz); + __builtin_memcpy (newptr, ptr, oldsz > newsz ? newsz : oldsz); __nvptx_free (ptr); return newptr;