lib/mempcpy.[ch]: Remove our definition of mempcpy(3)

It is provided by glibc, musl, and FreeBSD.

Reported-by: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
Alejandro Colomar
2023-09-04 08:57:43 -05:00
committed by Serge Hallyn
parent 9b0f8ddc30
commit c1fd94d7d5
6 changed files with 1 additions and 60 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
AC_CHECK_FUNCS(arc4random_buf futimes \
getentropy getrandom getspnam getusershell \
initgroups lckpwdf lutimes mempcpy \
initgroups lckpwdf lutimes \
setgroups updwtmp updwtmpx innetgr \
getspnam_r \
rpmatch \
-2
View File
@@ -84,8 +84,6 @@ libshadow_la_SOURCES = \
lockpw.c \
loginprompt.c \
mail.c \
mempcpy.c \
mempcpy.h \
memzero.c \
memzero.h \
motd.c \
-23
View File
@@ -1,23 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <config.h>
#if !defined(HAVE_MEMPCPY)
#ident "$Id$"
#include "mempcpy.h"
#include <stddef.h>
extern inline void *mempcpy(void *restrict dst, const void *restrict src,
size_t n);
#endif
-31
View File
@@ -1,31 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023, Alejandro Colomar <alx@kernel.org>
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef SHADOW_INCLUDE_LIB_MEMPCPY_H_
#define SHADOW_INCLUDE_LIB_MEMPCPY_H_
#include <config.h>
#if !defined(HAVE_MEMPCPY)
#include <stddef.h>
#include <string.h>
inline void *mempcpy(void *restrict dst, const void *restrict src, size_t n);
inline void *
mempcpy(void *restrict dst, const void *restrict src, size_t n)
{
return memcpy(dst, src, n) + n;
}
#endif // !HAVE_MEMPCPY
#endif // include guard
-2
View File
@@ -17,8 +17,6 @@
#include <stddef.h>
#include <string.h>
#include "mempcpy.h"
inline char *stpecpy(char *dst, char *end, const char *restrict src);
-1
View File
@@ -14,7 +14,6 @@
#include <stddef.h>
#include <string.h>
#include "mempcpy.h"
#include "must_be.h"
#include "sizeof.h"