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:
committed by
Serge Hallyn
parent
9b0f8ddc30
commit
c1fd94d7d5
+1
-1
@@ -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 \
|
||||
|
||||
@@ -84,8 +84,6 @@ libshadow_la_SOURCES = \
|
||||
lockpw.c \
|
||||
loginprompt.c \
|
||||
mail.c \
|
||||
mempcpy.c \
|
||||
mempcpy.h \
|
||||
memzero.c \
|
||||
memzero.h \
|
||||
motd.c \
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -17,8 +17,6 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mempcpy.h"
|
||||
|
||||
|
||||
inline char *stpecpy(char *dst, char *end, const char *restrict src);
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "mempcpy.h"
|
||||
#include "must_be.h"
|
||||
#include "sizeof.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user