Message ID | acdd690e-77fb-4a90-9471-4f165d5a0ad6@knaff.lu (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | AT&T Unix PC : 14-broken-wait-h (amended) | expand |
diff -X ../exclude.txt -urN dash-0.5.12+13-wait3-replacement/configure.ac dash-0.5.12+14-broken-wait-h/configure.ac --- dash-0.5.12+13-wait3-replacement/configure.ac 2024-11-10 20:26:19.105474215 +0000 +++ dash-0.5.12+14-broken-wait-h/configure.ac 2024-11-17 18:36:24.270333145 +0000 @@ -46,6 +46,7 @@ dnl Checks for header files. AC_CHECK_HEADERS(alloca.h paths.h pwd.h stdbool.h dirent.h \ getopt.h sys/resource.h termios.h sys/time.h) +AC_HEADER_SYS_WAIT dnl Check for declarations AC_CHECK_DECL([_PATH_BSHELL],,AC_DEFINE_UNQUOTED([_PATH_BSHELL], "/bin/sh", [Define to system shell path]),[ diff -X ../exclude.txt -urN dash-0.5.12+13-wait3-replacement/src/jobs.c dash-0.5.12+14-broken-wait-h/src/jobs.c --- dash-0.5.12+13-wait3-replacement/src/jobs.c 2024-11-10 21:51:55.911519696 +0000 +++ dash-0.5.12+14-broken-wait-h/src/jobs.c 2024-11-17 18:36:24.270333145 +0000 @@ -43,8 +43,12 @@ #endif #include <sys/types.h> #include <sys/param.h> + +#ifdef HAVE_SYS_WAIT_H +# include <sys/wait.h> +#endif + #ifdef BSD -#include <sys/wait.h> #ifdef HAVE_SYS_TIME_H #include <sys/time.h> #endif diff -X ../exclude.txt -urN dash-0.5.12+13-wait3-replacement/src/system.h dash-0.5.12+14-broken-wait-h/src/system.h --- dash-0.5.12+13-wait3-replacement/src/system.h 2024-11-10 14:53:08.418618090 +0000 +++ dash-0.5.12+14-broken-wait-h/src/system.h 2024-11-17 18:36:24.274333237 +0000 @@ -220,3 +220,14 @@ #ifndef HAVE_LSTAT #define lstat stat #endif + +/* As recommended by https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html */ +#ifndef WEXITSTATUS +# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) +#endif +#ifndef WIFEXITED +# define WIFEXITED(stat_val) (((stat_val) & 255) == 0) +#endif +#ifndef WTERMSIG +#define WTERMSIG(stat_val) ((stat_val) & 127) +#endif