]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib/mempcpy.[ch]: Remove our definition of mempcpy(3)
authorAlejandro Colomar <alx@kernel.org>
Sat, 2 Sep 2023 16:14:19 +0000 (18:14 +0200)
committerSerge Hallyn <serge@hallyn.com>
Mon, 4 Sep 2023 13:57:43 +0000 (08:57 -0500)
It is provided by glibc, musl, and FreeBSD.

Reported-by: Sam James <sam@gentoo.org>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
configure.ac
lib/Makefile.am
lib/mempcpy.c [deleted file]
lib/mempcpy.h [deleted file]
lib/stpecpy.h
lib/zustr2stp.h

index b3bbf57d84f6fd5fb8c5949a014c33b199af0471..7d21303819ae00ce05531e8e6633381dfee330aa 100644 (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 \
index 11e405c29e6937099c6648f567f749f0644654c4..897f0602fef1ed58cee6fd47184940c21c0b5ae5 100644 (file)
@@ -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 (file)
index 14a0961..0000000
+++ /dev/null
@@ -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
diff --git a/lib/mempcpy.h b/lib/mempcpy.h
deleted file mode 100644 (file)
index 528b976..0000000
+++ /dev/null
@@ -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
index 766793ba3c013f5079b0a64c242f7017e031a153..c4a60680f3d40cdd48a9e1ce87becb443031d27a 100644 (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);
 
index f2dbc741f951a517894e8e93da60df6d86224e5a..2160a1b0acc90925100aa4eaf3fb1d8f29d61377 100644 (file)
@@ -14,7 +14,6 @@
 #include <stddef.h>
 #include <string.h>
 
-#include "mempcpy.h"
 #include "must_be.h"
 #include "sizeof.h"