3 * Copyright 1998,1999 The OpenLDAP Foundation, Redwood City, California, USA
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.
15 #include <sys/types.h>
18 # include <sys/wait.h>
21 #define LDAP_HI(s) (((s) >> 8) & 0377)
22 #define LDAP_LO(s) ((s) & 0377)
24 /* These should work on non-POSIX UNIX platforms,
25 all bets on off on non-POSIX non-UNIX platforms... */
27 # define WIFEXITED(s) (LDAP_LO(s) == 0)
30 # define WEXITSTATUS(s) LDAP_HI(s)
33 # define WIFSIGNALED(s) (LDAP_LO(s) > 0 && LDAP_HI(s) == 0)
36 # define WTERMSIG(s) (LDAP_LO(s) & 0177)
39 # define WIFSTOPPED(s) (LDAP_LO(s) == 0177 && LDAP_HI(s) != 0)
42 # define WSTOPSIG(s) LDAP_HI(s)
46 # define WAIT_FLAGS ( WNOHANG | WUNTRACED | WCONTINUED )
48 # define WAIT_FLAGS ( WNOHANG | WUNTRACED )
51 #endif /* _AC_WAIT_H */