summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2012-07-30 23:35:08 -0700
committerGlenn Morris <rgm@gnu.org>2012-07-30 23:35:08 -0700
commit400d5621b84deaacc6d4046d21d4d40b80402786 (patch)
treeac78cfa646259b18697a9d00f03268f97f3fdf92
parent7552f3ee025f0741d5cfe7ed6c9b91699f372f48 (diff)
Move wait3, WRETCODE from src/s to configure
* configure.ac (wait3, WRETCODE): Move here from src/s/usg5-4-common.h. * s/usg5-4-common.h (wait3, WRETCODE): Let configure set them.
-rw-r--r--ChangeLog2
-rw-r--r--configure.ac17
-rw-r--r--src/ChangeLog2
-rw-r--r--src/s/usg5-4-common.h9
4 files changed, 21 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index e51d91059a..d919239e05 100644
--- 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.
diff --git a/configure.ac b/configure.ac
index fd68e93beb..3007f79a8b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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* )
diff --git a/src/ChangeLog b/src/ChangeLog
index cd14672820..12afc8d080 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -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.
diff --git a/src/s/usg5-4-common.h b/src/s/usg5-4-common.h
index 05f2214346..1b545aad1c 100644
--- a/src/s/usg5-4-common.h
+++ b/src/s/usg5-4-common.h
@@ -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)
-