]> code.delx.au - gnu-emacs/commitdiff
Move wait3, WRETCODE from src/s to configure
authorGlenn Morris <rgm@gnu.org>
Tue, 31 Jul 2012 06:35:08 +0000 (23:35 -0700)
committerGlenn Morris <rgm@gnu.org>
Tue, 31 Jul 2012 06:35:08 +0000 (23:35 -0700)
* configure.ac (wait3, WRETCODE): Move here from src/s/usg5-4-common.h.

* s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.

ChangeLog
configure.ac
src/ChangeLog
src/s/usg5-4-common.h

index e51d91059aea9e9316cb41c7f9b666ffde0d94da..d919239e05e5cb8b9329f25185c67e63ae14be00 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2012-07-31  Glenn Morris  <rgm@gnu.org>
 
+       * configure.ac (wait3, WRETCODE): Move here from src/s/usg5-4-common.h.
+
        * configure.ac (opsysfile): Set to empty on hpux*, darwin;
        and to s/usg5-4-common.h on irix6-5.
 
index fd68e93beb61e60fd81b46fe17df7cefa51e8cef..3007f79a8b655b5f3cbb2d151d9476110e3f2730 100644 (file)
@@ -3645,6 +3645,23 @@ case $opsys in
     ;;
 esac
 
+dnl Used in process.c.
+case $opsys in
+  irix6-5 | sol2* | unixware )
+    dnl It is possible to receive SIGCHLD when there are no children
+    dnl waiting, because a previous waitsys(2) cleaned up the carcass
+    dnl of child without clearing the SIGCHLD pending info.  So, use a
+    dnl non-blocking wait3 instead, which maps to waitpid(2) in SysVr4.
+    AC_DEFINE(wait3(status, options, rusage),
+      [waitpid ((pid_t) -1, (status), (options))],
+      [Some platforms redefine this.])
+    dnl FIXME this makes no sense, because WRETCODE is only used in
+    dnl process.c, which includes syswait.h aftet config.h, and the
+    dnl former unconditionally redefines WRETCODE.
+    AC_DEFINE(WRETCODE(w), [(w >> 8)], [Some platforms redefine this.])
+    ;;
+esac
+
 
 case $opsys in
   hpux* | sol2* )
index cd146728208fb562ceb698016f628fb8aea186f2..12afc8d080dc6f407baffaf87ac677a7d7dad637 100644 (file)
@@ -8,6 +8,8 @@
 
 2012-07-31  Glenn Morris  <rgm@gnu.org>
 
+       * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
+
        * conf_post.h [IRIX6_5]: Move remaining contents of s/irix6-5.h here.
        * s/irix6-5.h: Remove file.
 
index 05f221434607d4c91472352ef824ca693eecb9c5..1b545aad1cea88ebf48d6dec5b1ae9279356c34f 100644 (file)
@@ -33,12 +33,3 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/stropts.h>
 #include <sys/termios.h>
 #endif
-
-/* It is possible to receive SIGCHLD when there are no children
-   waiting, because a previous waitsys(2) cleaned up the carcass of child
-   without clearing the SIGCHLD pending info.  So, use a non-blocking
-   wait3 instead, which maps to waitpid(2) in SysVr4. */
-#define wait3(status, options, rusage) \
-  waitpid ((pid_t) -1, (status), (options))
-#define WRETCODE(w) (w >> 8)
-