Add support for tab-completion when selecting by rule
[alpine.git] / pith / osdep / forkwait.h
blob0fafbde681b3e82c664c36a644766e245a86858b
1 /*
2 * $Id: forkwait.h 761 2007-10-23 22:35:18Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2013-2022 Eduardo Chappa
6 * Copyright 2006 University of Washington
8 * Licensed under the Apache License, Version 2.0 (the "License");
9 * you may not use this file except in compliance with the License.
10 * You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * ========================================================================
17 #ifndef PITH_OSDEP_FORKWAIT_INCLUDED
18 #define PITH_OSDEP_FORKWAIT_INCLUDED
21 #if HAVE_UNION_WAIT
22 #define WAITSTATUS_T union wait
23 #else
24 #define WAITSTATUS_T int
25 #endif
27 #ifndef WEXITSTATUS
28 #define WEXITSTATUS(X) (((X) >> 8) & 0xff) /* high bits tell exit value */
29 #endif
30 #ifndef WIFEXITED
31 #define WIFEXITED(X) (!((X) & 0xff)) /* low bits tell how it died */
32 #endif
34 #if !HAVE_WORKING_VFORK
35 #define vfork fork
36 #endif
39 #endif /* PITH_OSDEP_FORKWAIT_INCLUDED */