diff options
| author | Dan Nicolaescu | 2008-07-12 05:31:23 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-07-12 05:31:23 +0000 |
| commit | bba104c11e882cd9ea7c2c9ec4cf79b7f152d5ff (patch) | |
| tree | 6cae6cf2406e44c00e2ae670a4555f741bdb01d4 /src/process.c | |
| parent | 2f4ec7ce4fe0cb5036a919abdc101a611202ffd2 (diff) | |
| download | emacs-bba104c11e882cd9ea7c2c9ec4cf79b7f152d5ff.tar.gz emacs-bba104c11e882cd9ea7c2c9ec4cf79b7f152d5ff.zip | |
* syswait.h: Remove old if 0 code. Do not define WAITTYPE, it was
always defined as int.
* s/netbsd.h (HAVE_UNION_WAIT, HAVE_WAIT_HEADER, WAIT_USE_INT):
* s/gnu.h (HAVE_WAIT_HEADER, WAIT_USE_INT, HAVE_UNION_WAIT):
* s/gnu-linux.h (HAVE_WAIT_HEADER):
* s/freebsd.h (HAVE_WAIT_HEADER):
* s/bsd-common.h (HAVE_UNION_WAIT):
* s/aix4-2.h (HAVE_WAIT_HEADER):
* m/mips.h (HAVE_UNION_WAIT):
* s/usg5-4.h (HAVE_WAIT_HEADER, WAITTYPE): Do not define, not used.
(COFF, static): Do not define, they are undefined later in the file.
* process.c (update_status): Don't use a union.
(status_convert):
(sigchld_handler): Use int instead of WAITTYPE.
* movemail.c (main): Use int instead of WAITTYPE.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c index 0ddeb517290..c2a20b92db1 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -407,16 +407,14 @@ static char pty_name[24]; | |||
| 407 | /* Compute the Lisp form of the process status, p->status, from | 407 | /* Compute the Lisp form of the process status, p->status, from |
| 408 | the numeric status that was returned by `wait'. */ | 408 | the numeric status that was returned by `wait'. */ |
| 409 | 409 | ||
| 410 | static Lisp_Object status_convert (); | 410 | static Lisp_Object status_convert (int); |
| 411 | 411 | ||
| 412 | static void | 412 | static void |
| 413 | update_status (p) | 413 | update_status (p) |
| 414 | struct Lisp_Process *p; | 414 | struct Lisp_Process *p; |
| 415 | { | 415 | { |
| 416 | union { int i; WAITTYPE wt; } u; | ||
| 417 | eassert (p->raw_status_new); | 416 | eassert (p->raw_status_new); |
| 418 | u.i = p->raw_status; | 417 | p->status = status_convert (p->raw_status); |
| 419 | p->status = status_convert (u.wt); | ||
| 420 | p->raw_status_new = 0; | 418 | p->raw_status_new = 0; |
| 421 | } | 419 | } |
| 422 | 420 | ||
| @@ -424,8 +422,7 @@ update_status (p) | |||
| 424 | the list that we use internally. */ | 422 | the list that we use internally. */ |
| 425 | 423 | ||
| 426 | static Lisp_Object | 424 | static Lisp_Object |
| 427 | status_convert (w) | 425 | status_convert (int w) |
| 428 | WAITTYPE w; | ||
| 429 | { | 426 | { |
| 430 | if (WIFSTOPPED (w)) | 427 | if (WIFSTOPPED (w)) |
| 431 | return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil)); | 428 | return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil)); |
| @@ -6698,7 +6695,7 @@ sigchld_handler (signo) | |||
| 6698 | while (1) | 6695 | while (1) |
| 6699 | { | 6696 | { |
| 6700 | pid_t pid; | 6697 | pid_t pid; |
| 6701 | WAITTYPE w; | 6698 | int w; |
| 6702 | Lisp_Object tail; | 6699 | Lisp_Object tail; |
| 6703 | 6700 | ||
| 6704 | #ifdef WNOHANG | 6701 | #ifdef WNOHANG |
| @@ -6770,12 +6767,10 @@ sigchld_handler (signo) | |||
| 6770 | /* Change the status of the process that was found. */ | 6767 | /* Change the status of the process that was found. */ |
| 6771 | if (p != 0) | 6768 | if (p != 0) |
| 6772 | { | 6769 | { |
| 6773 | union { int i; WAITTYPE wt; } u; | ||
| 6774 | int clear_desc_flag = 0; | 6770 | int clear_desc_flag = 0; |
| 6775 | 6771 | ||
| 6776 | p->tick = ++process_tick; | 6772 | p->tick = ++process_tick; |
| 6777 | u.wt = w; | 6773 | p->raw_status = w; |
| 6778 | p->raw_status = u.i; | ||
| 6779 | p->raw_status_new = 1; | 6774 | p->raw_status_new = 1; |
| 6780 | 6775 | ||
| 6781 | /* If process has terminated, stop waiting for its output. */ | 6776 | /* If process has terminated, stop waiting for its output. */ |