Use gnulib's sys/wait.h replacement.
authorBruno Haible <bruno@clisp.org>
Mon, 20 Oct 2008 22:58:48 +0000 (00:58 +0200)
committerBruno Haible <bruno@clisp.org>
Mon, 20 Oct 2008 23:01:26 +0000 (01:01 +0200)
ChangeLog
modules/posix_spawnp-tests
tests/test-posix_spawn1.c
tests/test-posix_spawn2.c

index 2cf7e62..2849469 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-10-20  Bruno Haible  <bruno@clisp.org>
 
+       * modules/posix_spawnp-tests (Depends-on): Add sys_wait.
+       * tests/test-posix_spawn1.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
+       WIFSIGNALED, WIFEXITED, WIFSTOPPED): Remove fallback definitions.
+       * tests/test-posix_spawn2.c (WTERMSIG, WCOREDUMP, WEXITSTATUS,
+       WIFSIGNALED, WIFEXITED, WIFSTOPPED): Likewise.
+
+2008-10-20  Bruno Haible  <bruno@clisp.org>
+
        * m4/posix_spawn.m4 (gl_POSIX_SPAWN_WORKS): Test against another bug
        of posix_spawn on AIX 5.3.
 
index 7db28e8..7c04580 100644 (file)
@@ -17,6 +17,7 @@ posix_spawnattr_destroy
 sigprocmask
 stdbool
 unistd
+sys_wait
 
 configure.ac:
 
index 9d3bb22..0c30b88 100644 (file)
@@ -43,25 +43,6 @@ extern char **environ;
 # define STDERR_FILENO 2
 #endif
 
-#ifndef WTERMSIG
-# define WTERMSIG(x) ((x) & 0x7f)
-#endif
-#ifndef WCOREDUMP
-# define WCOREDUMP(x) ((x) & 0x80)
-#endif
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
-#endif
-#ifndef WIFSIGNALED
-# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(x) (WTERMSIG (x) == 0)
-#endif
-#ifndef WIFSTOPPED
-# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f)
-#endif
-
 #define CHILD_PROGRAM_FILENAME "test-posix_spawn1.sh"
 
 static int
index e675822..826d38b 100644 (file)
@@ -43,25 +43,6 @@ extern char **environ;
 # define STDERR_FILENO 2
 #endif
 
-#ifndef WTERMSIG
-# define WTERMSIG(x) ((x) & 0x7f)
-#endif
-#ifndef WCOREDUMP
-# define WCOREDUMP(x) ((x) & 0x80)
-#endif
-#ifndef WEXITSTATUS
-# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
-#endif
-#ifndef WIFSIGNALED
-# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f)
-#endif
-#ifndef WIFEXITED
-# define WIFEXITED(x) (WTERMSIG (x) == 0)
-#endif
-#ifndef WIFSTOPPED
-# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f)
-#endif
-
 #define CHILD_PROGRAM_FILENAME "test-posix_spawn2.sh"
 
 static int