]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Remove HAVE_MEMSET ifdefs 480/head
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:52:00 +0000 (21:52 +0100)
memset(3) has been in standard C since C89.  It is also in
POSIX.1-2001, in SVr4, and in 4.3BSD (see memset(3) and memset(3p)).
We can assume that this function is always available.

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

index fbdcc17ee126d4b70bbbfe19e6203e1f73fe9040..9c1a589f5960dc791b96169d25ee3bf9240a6f2e 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 memset \
+       getutent initgroups lchown lckpwdf lstat lutimes \
        setgroups sigaction strchr updwtmp updwtmpx innetgr getpwnam_r \
        getpwuid_r getgrnam_r getgrgid_r getspnam_r getaddrinfo ruserok \
        dlopen)
index 5153f43ca0d3d7579ab083ee2f7cdfef1b7aa9c5..fc1521cbe03380464eb2fb9b25735c2ded3161ef 100644 (file)
@@ -111,11 +111,7 @@ char *strchr (), *strrchr (), *strtok ();
 # endif
 #endif                         /* not TIME_WITH_SYS_TIME */
 
-#ifdef HAVE_MEMSET
-# define memzero(ptr, size) memset((void *)(ptr), 0, (size))
-#else
-# define memzero(ptr, size) bzero((char *)(ptr), (size))
-#endif
+#define memzero(ptr, size) memset((void *)(ptr), 0, (size))
 #define strzero(s) memzero(s, strlen(s))       /* warning: evaluates twice */
 
 #ifdef HAVE_DIRENT_H           /* DIR_SYSV */