Files
glibc/string/mempcpy.c
T

40 lines
1.3 KiB
C
Raw Normal View History

1997-09-11 12:09:10 +00:00
/* Copy memory to memory until the specified number of bytes
has been copied, return pointer to following byte.
Overlap is NOT handled correctly.
Copyright (C) 1991-2018 Free Software Foundation, Inc.
1997-09-11 12:09:10 +00:00
This file is part of the GNU C Library.
Contributed by Torbjorn Granlund (tege@sics.se).
The GNU C Library is free software; you can redistribute it and/or
2001-07-06 04:58:11 +00:00
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
1997-09-11 12:09:10 +00:00
The GNU C Library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2001-07-06 04:58:11 +00:00
Lesser General Public License for more details.
1997-09-11 12:09:10 +00:00
2001-07-06 04:58:11 +00:00
You should have received a copy of the GNU Lesser General Public
2012-02-09 23:18:22 +00:00
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
1997-09-11 12:09:10 +00:00
2014-11-14 13:48:39 +00:00
#define NO_MEMPCPY_STPCPY_REDIRECT
1997-09-11 12:09:10 +00:00
#include <string.h>
#undef mempcpy
#undef __mempcpy
1997-09-11 12:09:10 +00:00
2013-10-14 07:40:52 -05:00
#ifndef MEMPCPY
# define MEMPCPY __mempcpy
#endif
1997-09-11 12:09:10 +00:00
void *
2013-10-14 07:40:52 -05:00
MEMPCPY (void *dest, const void *src, size_t len)
1997-09-11 12:09:10 +00:00
{
2013-02-13 12:57:41 +01:00
return memcpy (dest, src, len) + len;
1997-09-11 12:09:10 +00:00
}
2002-08-03 07:02:10 +00:00
libc_hidden_def (__mempcpy)
1997-09-11 12:09:10 +00:00
weak_alias (__mempcpy, mempcpy)
2004-05-28 06:56:51 +00:00
libc_hidden_builtin_def (mempcpy)