]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Remove HAVE_MEMCPY ifdefs
authorAlejandro Colomar <alx.manpages@gmail.com>
Mon, 27 Dec 2021 19:50:06 +0000 (20:50 +0100)
committerAlejandro Colomar <alx.manpages@gmail.com>
Mon, 27 Dec 2021 20:38:47 +0000 (21:38 +0100)
memcpy(3) has been in standard C since C89.  It is also in
POSIX.1-2001, in SVr4, and in 4.3BSD (see memcpy(3) and memcpy(3p)).
We can assume that this function is always available.

Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
configure.ac
lib/defines.h
libmisc/getdate.y

index a94e897fa691a25f6809eee26dd793238c301197..fbdcc17ee126d4b70bbbfe19e6203e1f73fe9040 100644 (file)
@@ -53,7 +53,7 @@ AC_CHECK_HEADER([shadow.h],,[AC_MSG_ERROR([You need a libc with shadow.h])])
 
 AC_CHECK_FUNCS(arc4random_buf l64a fchmod fchown fsync futimes getgroups \
        gethostname getentropy getrandom getspnam gettimeofday getusershell \
-       getutent initgroups lchown lckpwdf lstat lutimes memcpy memset \
+       getutent initgroups lchown lckpwdf lstat lutimes memset \
        setgroups sigaction strchr updwtmp updwtmpx innetgr getpwnam_r \
        getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo ruserok \
        dlopen)
index e1500a765f2ce12df8d35707bf8801dd530ef30c..5153f43ca0d3d7579ab083ee2f7cdfef1b7aa9c5 100644 (file)
@@ -70,10 +70,6 @@ extern char * textdomain (const char * domainname);
 #  define strrchr rindex
 # endif
 char *strchr (), *strrchr (), *strtok ();
-
-# ifndef HAVE_MEMCPY
-#  define memcpy(d, s, n) bcopy((s), (d), (n))
-# endif
 #endif                         /* not STDC_HEADERS */
 
 #if HAVE_ERRNO_H
index 5a8bde2ee1da43758fbebed321bb9d59796f12cb..7afa995bcdd9f682109a6baf239cd7b62f0657a9 100644 (file)
@@ -61,7 +61,7 @@
 /* Some old versions of bison generate parsers that use bcopy.
    That loses on systems that don't provide the function, so we have
    to redefine it here.  */
-#if !defined (HAVE_BCOPY) && defined (HAVE_MEMCPY) && !defined (bcopy)
+#if !defined (HAVE_BCOPY) && !defined (bcopy)
 # define bcopy(from, to, len) memcpy ((to), (from), (len))
 #endif