1354
|
1 /* |
|
2 |
1884
|
3 Copyright (C) 1996 John W. Eaton |
1354
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
20 |
|
21 */ |
|
22 |
|
23 #if !defined (octave_syswait_h) |
|
24 #define octave_syswait_h 1 |
|
25 |
|
26 // This mess suggested by the autoconf manual. |
|
27 |
|
28 #include <sys/types.h> |
2095
|
29 |
1354
|
30 #if HAVE_SYS_WAIT_H |
|
31 #include <sys/wait.h> |
|
32 #endif |
2095
|
33 |
|
34 #ifndef WIFEXITED |
|
35 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0) |
|
36 #endif |
|
37 |
1354
|
38 #ifndef WEXITSTATUS |
|
39 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8) |
|
40 #endif |
2095
|
41 |
|
42 #ifndef WIFSIGNALLED |
|
43 #define WIFSIGNALLED(stat_val) \ |
|
44 (((stat_val) & 0177) != 0177 && ((stat_val) & 0177) != 0) |
1354
|
45 #endif |
|
46 |
|
47 #endif |
|
48 |
|
49 /* |
|
50 ;;; Local Variables: *** |
|
51 ;;; mode: C++ *** |
|
52 ;;; End: *** |
|
53 */ |