diff options
| author | Dave Love | 2000-07-05 17:00:06 +0000 |
|---|---|---|
| committer | Dave Love | 2000-07-05 17:00:06 +0000 |
| commit | d72c1cadc493353965f5f57d7098a1cb3170aeb4 (patch) | |
| tree | 68792057cb90387bb5f1990a6bc56c2f39b0b8cc /src/syswait.h | |
| parent | 66a4b280fb3c740413f1f40a4bcdf08b31bd1b69 (diff) | |
| download | emacs-d72c1cadc493353965f5f57d7098a1cb3170aeb4.tar.gz emacs-d72c1cadc493353965f5f57d7098a1cb3170aeb4.zip | |
Use the autoconf recommended approach. Old code #if'd out in case we
need to revert.
Diffstat (limited to 'src/syswait.h')
| -rw-r--r-- | src/syswait.h | 64 |
1 files changed, 63 insertions, 1 deletions
diff --git a/src/syswait.h b/src/syswait.h index 1889c36a32e..d3edfdf0768 100644 --- a/src/syswait.h +++ b/src/syswait.h | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Define wait system call interface for Emacs. | 1 | /* Define wait system call interface for Emacs. |
| 2 | Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc. | 2 | Copyright (C) 1993, 1994, 1995, 2000 Free Software Foundation, Inc. |
| 3 | 3 | ||
| 4 | This file is part of GNU Emacs. | 4 | This file is part of GNU Emacs. |
| 5 | 5 | ||
| @@ -22,7 +22,65 @@ Boston, MA 02111-1307, USA. */ | |||
| 22 | On many systems, there is a structure defined for this. | 22 | On many systems, there is a structure defined for this. |
| 23 | But on vanilla-ish USG systems there is not. */ | 23 | But on vanilla-ish USG systems there is not. */ |
| 24 | 24 | ||
| 25 | #ifndef EMACS_SYSWAIT_H | ||
| 26 | #define EMACS_SYSWAIT_H | ||
| 27 | |||
| 25 | #ifndef VMS | 28 | #ifndef VMS |
| 29 | |||
| 30 | /* Try the approach recommended by autoconf. If this doesn't cause | ||
| 31 | trouble anywhere, remove the original code, which is #if'd out | ||
| 32 | below. */ | ||
| 33 | |||
| 34 | #if 1 | ||
| 35 | #undef WAITTYPE | ||
| 36 | #define WAITTYPE int | ||
| 37 | #define WRETCODE(w) WEXITSTATUS (w) | ||
| 38 | |||
| 39 | #include <sys/types.h> | ||
| 40 | #if HAVE_SYS_WAIT_H | ||
| 41 | #include <sys/wait.h> | ||
| 42 | #endif | ||
| 43 | |||
| 44 | #if defined (HPUX) || defined (convex) | ||
| 45 | /* HPUX version 7 has broken definitions of these. */ | ||
| 46 | /* pvogel@convex.com says the convex does too. */ | ||
| 47 | #undef WTERMSIG | ||
| 48 | #undef WSTOPSIG | ||
| 49 | #undef WIFSTOPPED | ||
| 50 | #undef WIFSIGNALED | ||
| 51 | #undef WIFEXITED | ||
| 52 | #endif /* HPUX || convex */ | ||
| 53 | |||
| 54 | #ifndef WEXITSTATUS | ||
| 55 | # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) | ||
| 56 | #endif | ||
| 57 | #ifndef WIFEXITED | ||
| 58 | # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) | ||
| 59 | #endif | ||
| 60 | #ifndef WIFSTOPPED | ||
| 61 | #define WIFSTOPPED(w) ((w&0377) == 0177) | ||
| 62 | #endif | ||
| 63 | #ifndef WIFSIGNALED | ||
| 64 | #define WIFSIGNALED(w) ((w&0377) != 0177 && (w&~0377) == 0) | ||
| 65 | #endif | ||
| 66 | #ifndef WIFEXITED | ||
| 67 | #define WIFEXITED(w) ((w&0377) == 0) | ||
| 68 | #endif | ||
| 69 | #ifndef WRETCODE | ||
| 70 | #define WRETCODE(w) (w >> 8) | ||
| 71 | #endif | ||
| 72 | #ifndef WSTOPSIG | ||
| 73 | #define WSTOPSIG(w) (w >> 8) | ||
| 74 | #endif | ||
| 75 | #ifndef WTERMSIG | ||
| 76 | #define WTERMSIG(w) (w & 0377) | ||
| 77 | #endif | ||
| 78 | #ifndef WCOREDUMP | ||
| 79 | #define WCOREDUMP(w) ((w&0200) != 0) | ||
| 80 | #endif | ||
| 81 | |||
| 82 | #else /* !1 */ | ||
| 83 | |||
| 26 | #ifndef WAITTYPE | 84 | #ifndef WAITTYPE |
| 27 | 85 | ||
| 28 | #ifdef WAIT_USE_INT | 86 | #ifdef WAIT_USE_INT |
| @@ -88,6 +146,8 @@ Boston, MA 02111-1307, USA. */ | |||
| 88 | #endif /* not WAIT_USE_INT */ | 146 | #endif /* not WAIT_USE_INT */ |
| 89 | #endif /* no WAITTYPE */ | 147 | #endif /* no WAITTYPE */ |
| 90 | 148 | ||
| 149 | #endif /* 1 */ | ||
| 150 | |||
| 91 | #else /* VMS */ | 151 | #else /* VMS */ |
| 92 | 152 | ||
| 93 | #define WAITTYPE int | 153 | #define WAITTYPE int |
| @@ -104,3 +164,5 @@ Boston, MA 02111-1307, USA. */ | |||
| 104 | #include "vmsproc.h" | 164 | #include "vmsproc.h" |
| 105 | 165 | ||
| 106 | #endif /* VMS */ | 166 | #endif /* VMS */ |
| 167 | |||
| 168 | #endif /* EMACS_SYSWAIT_H */ | ||