]> git.sur5r.net Git - openldap/blob - include/ac/wait.h
Style changes, added cvs keywords
[openldap] / include / ac / wait.h
1 /* Generic wait.h */
2 /*
3  * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
4  * All rights reserved.
5  *
6  * Redistribution and use in source and binary forms are permitted only
7  * as authorized by the OpenLDAP Public License.  A copy of this
8  * license is available at http://www.OpenLDAP.org/license.html or
9  * in file LICENSE in the top-level directory of the distribution.
10  */
11
12 #ifndef _AC_WAIT_H
13 #define _AC_WAIT_H
14
15 #include <sys/types.h>
16
17 #if HAVE_SYS_WAIT_H
18 # include <sys/wait.h>
19 #endif
20
21 #ifndef WEXITSTATUS
22 # define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
23 #endif
24 #ifndef WIFEXITED
25 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
26 #endif
27
28 #ifdef WCONTINUED
29 # define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
30 #else
31 # define WAIT_FLAGS ( WNOHANG | WUNTRACED )
32 #endif
33
34 #endif /* _AC_WAIT_H */