2 /* : : generated by proto : : */
3 /***********************************************************************
5 * This software is part of the ast package *
6 * Copyright (c) 1985-2010 AT&T Intellectual Property *
7 * and is licensed under the *
8 * Common Public License, Version 1.0 *
9 * by AT&T Intellectual Property *
11 * A copy of the License is available at *
12 * http://www.opensource.org/licenses/cpl1.0.txt *
13 * (with md5 checksum 059e8cd6165cb4c31e351f2b69388fd9) *
15 * Information and Software Systems Research *
19 * Glenn Fowler <gsf@research.att.com> *
20 * David Korn <dgk@research.att.com> *
21 * Phong Vo <kpv@research.att.com> *
23 ***********************************************************************/
26 * ast POSIX wait/exit support
30 #if !defined(__PROTO__)
31 #include <prototyped.h>
33 #if !defined(__LINKAGE__)
34 #define __LINKAGE__ /* 2004-08-11 transition */
43 #if defined(__STDPP__directive) && defined(__STDPP__hide)
44 __STDPP__directive pragma pp
:hide wait waitpid
46 #define wait ______wait
47 #define waitpid ______waitpid
50 #if defined(__STDPP__directive) && defined(__STDPP__hide)
51 __STDPP__directive pragma pp
:nohide wait waitpid
77 #define WIFEXITED(x) (!((x)&((1<<(EXIT_BITS-1))-1)))
81 #define WEXITSTATUS(x) (((x)>>EXIT_BITS)&((1<<EXIT_BITS)-1))
85 #define WIFSIGNALED(x) (((x)&((1<<(EXIT_BITS-1))-1))!=0)
89 #define WTERMSIG(x) ((x)&((1<<(EXIT_BITS-1))-1))
93 #define WIFSTOPPED(x) (((x)&((1<<EXIT_BITS)-1))==((1<<(EXIT_BITS-1))-1))
97 #define WSTOPSIG(x) WEXITSTATUS(x)
101 #define WTERMCORE(x) ((x)&(1<<(EXIT_BITS-1)))
104 extern __MANGLE__ pid_t wait
__PROTO__((int*));
105 extern __MANGLE__ pid_t waitpid
__PROTO__((pid_t
, int*, int));