]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Remove AC_HEADER_SYS_WAIT
authorAlejandro Colomar <alx.manpages@gmail.com>
Thu, 30 Dec 2021 13:25:49 +0000 (14:25 +0100)
committerSerge Hallyn <serge@hallyn.com>
Sat, 15 Jan 2022 14:25:53 +0000 (08:25 -0600)
GNU autoconf documentation marks this macro as obsolescent, as
current systems are compatible with POSIX.

Simplify code to unconditionally include <sys/wait.h>, and don't
redefine WIFEXITSTATUS() and WIFEXITED(), since they are mandated
by POSIX.

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

index 271d13531819e954b5e5cba15e3f4ecd42209a9c..b92329a08057acf1c9f5dcfbe871a6d2d706fcce 100644 (file)
@@ -37,7 +37,6 @@ AM_PROG_LIBTOOL
 dnl Checks for libraries.
 
 dnl Checks for header files.
-AC_HEADER_SYS_WAIT
 AC_HEADER_STDBOOL
 
 AC_CHECK_HEADERS(crypt.h errno.h fcntl.h limits.h unistd.h sys/time.h utmp.h \
index e4937e1c326afa045683132dd053d9e181458daf..afe86398a0fd0edee9d7d42fad53c114a68cd4d7 100644 (file)
@@ -68,15 +68,7 @@ extern char * textdomain (const char * domainname);
 
 #include <sys/stat.h>
 #include <sys/types.h>
-#if HAVE_SYS_WAIT_H
-# include <sys/wait.h>
-#endif
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
-#endif
+#include <sys/wait.h>
 
 #if HAVE_UNISTD_H
 # include <unistd.h>