From: Alejandro Colomar Date: Sat, 2 Sep 2023 16:14:19 +0000 (+0200) Subject: lib/mempcpy.[ch]: Remove our definition of mempcpy(3) X-Git-Tag: 4.15.0-rc1~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c1fd94d7d5b14e34a26ea1b3a2030c376df9ba36;p=thirdparty%2Fshadow.git lib/mempcpy.[ch]: Remove our definition of mempcpy(3) It is provided by glibc, musl, and FreeBSD. Reported-by: Sam James Signed-off-by: Alejandro Colomar --- diff --git a/configure.ac b/configure.ac index b3bbf57d8..7d2130381 100644 --- a/configure.ac +++ b/configure.ac @@ -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 \ diff --git a/lib/Makefile.am b/lib/Makefile.am index 11e405c29..897f0602f 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -84,8 +84,6 @@ libshadow_la_SOURCES = \ lockpw.c \ loginprompt.c \ mail.c \ - mempcpy.c \ - mempcpy.h \ memzero.c \ memzero.h \ motd.c \ diff --git a/lib/mempcpy.c b/lib/mempcpy.c deleted file mode 100644 index 14a09613f..000000000 --- a/lib/mempcpy.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023, Alejandro Colomar - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -#include - -#if !defined(HAVE_MEMPCPY) - -#ident "$Id$" - -#include "mempcpy.h" - -#include - - -extern inline void *mempcpy(void *restrict dst, const void *restrict src, - size_t n); - - -#endif diff --git a/lib/mempcpy.h b/lib/mempcpy.h deleted file mode 100644 index 528b976a4..000000000 --- a/lib/mempcpy.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2023, Alejandro Colomar - * - * SPDX-License-Identifier: BSD-3-Clause - */ - - -#ifndef SHADOW_INCLUDE_LIB_MEMPCPY_H_ -#define SHADOW_INCLUDE_LIB_MEMPCPY_H_ - - -#include - -#if !defined(HAVE_MEMPCPY) - -#include -#include - - -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 diff --git a/lib/stpecpy.h b/lib/stpecpy.h index 766793ba3..c4a60680f 100644 --- a/lib/stpecpy.h +++ b/lib/stpecpy.h @@ -17,8 +17,6 @@ #include #include -#include "mempcpy.h" - inline char *stpecpy(char *dst, char *end, const char *restrict src); diff --git a/lib/zustr2stp.h b/lib/zustr2stp.h index f2dbc741f..2160a1b0a 100644 --- a/lib/zustr2stp.h +++ b/lib/zustr2stp.h @@ -14,7 +14,6 @@ #include #include -#include "mempcpy.h" #include "must_be.h" #include "sizeof.h"