1 ?RCS: $Id: d_wifstat.U,v 3.0.1.3 1997/02/28 15:47:43 ram Exp $
3 ?RCS: Copyright (c) 1991-1993, Raphael Manfredi
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 3.0.
11 ?RCS: $Log: d_wifstat.U,v $
12 ?RCS: Revision 3.0.1.3 1997/02/28 15:47:43 ram
13 ?RCS: patch61: added a ?F: metalint hint
15 ?RCS: Revision 3.0.1.2 1995/07/25 14:09:10 ram
16 ?RCS: patch56: re-arranged compile line to include ldflags before objects
18 ?RCS: Revision 3.0.1.1 1995/03/21 08:47:46 ram
19 ?RCS: patch52: created
21 ?MAKE:d_wifstat: d_uwait +cc +ccflags +ldflags +libs Oldconfig cat rm
22 ?MAKE: -pick add $@ %<
24 ?S: This symbol conditionally defines USE_WIFSTAT if the C program can
25 ?S: safely use the WIFxxx macros with the kind of wait() parameter
26 ?S: declared in the program (see UNION_WAIT), or if it can't. Should
27 ?S: only matter on HP-UX, where the macros are incorrectly written and
28 ?S: therefore cause programs using them with an 'union wait' variable
29 ?S: to not compile properly.
32 ?C: This symbol, if defined, indicates to the C program that the argument
33 ?C: for the WIFxxx set of macros such as WIFSIGNALED or WIFEXITED can
34 ?C: be of the same kind as the one used to hold the wait() status. Should
35 ?C: only matter on HP-UX, where the macros are incorrectly written and
36 ?C: therefore cause programs using them with an 'union wait' variable
37 ?C: to not compile properly. See also UNION_WAIT.
39 ?H:#$d_wifstat USE_WIFSTAT /**/
43 : see if we can use WIFxxx macros
46 "$define") echo "As before, you can safely use WIFEXITED and friends!" >&4;;
47 "$undef") echo "You still can't use WIFEXITED and friends!" >&4;;
49 echo "Let's see whether you can use the WIFEXITED(status) macro and its"
51 "$define") type='union wait';;
54 echo "friends with status declared as '$type status'..."
56 #include <sys/types.h>
65 if (WIFEXITED(status))
74 if $cc $ccflags $ldflags foo.c -o foo $libs >/dev/null 2>&1; then
75 if ./foo >/dev/null; then
76 echo "Great! Looks like we can use the WIFxxx macros." >&4
79 echo "You don't seem to have WIFxxx macros, but that's ok." >&4
82 echo "Apparently you can't use WIFxxx macros properly." >&4