| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
#ifndef _BLT_WAIT_H |
| 26 |
#define _BLT_WAIT_H |
| 27 |
|
| 28 |
#ifdef HAVE_WAITFLAGS_H |
| 29 |
# include <waitflags.h> |
| 30 |
#endif |
| 31 |
#ifdef HAVE_SYS_WAIT_H |
| 32 |
# include <sys/wait.h> |
| 33 |
#endif |
| 34 |
#ifdef HAVE_ERRNO_H |
| 35 |
# include <errno.h> |
| 36 |
#endif |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
#ifndef EINPROGRESS |
| 43 |
#define EINPROGRESS WSAEINPROGRESS |
| 44 |
#endif |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
#ifndef ENOTSUP |
| 51 |
#define ENOTSUP -1030507 |
| 52 |
#endif |
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
#ifndef EWOULDBLOCK |
| 60 |
#define EWOULDBLOCK EAGAIN |
| 61 |
#endif |
| 62 |
#ifndef EALREADY |
| 63 |
#define EALREADY 149 |
| 64 |
#endif |
| 65 |
#ifndef ENOTSOCK |
| 66 |
#define ENOTSOCK 95 |
| 67 |
#endif |
| 68 |
#ifndef EDESTADDRREQ |
| 69 |
#define EDESTADDRREQ 96 |
| 70 |
#endif |
| 71 |
#ifndef EMSGSIZE |
| 72 |
#define EMSGSIZE 97 |
| 73 |
#endif |
| 74 |
#ifndef EPROTOTYPE |
| 75 |
#define EPROTOTYPE 98 |
| 76 |
#endif |
| 77 |
#ifndef ENOPROTOOPT |
| 78 |
#define ENOPROTOOPT 99 |
| 79 |
#endif |
| 80 |
#ifndef EPROTONOSUPPORT |
| 81 |
#define EPROTONOSUPPORT 120 |
| 82 |
#endif |
| 83 |
#ifndef ESOCKTNOSUPPORT |
| 84 |
#define ESOCKTNOSUPPORT 121 |
| 85 |
#endif |
| 86 |
#ifndef EOPNOTSUPP |
| 87 |
#define EOPNOTSUPP 122 |
| 88 |
#endif |
| 89 |
#ifndef EPFNOSUPPORT |
| 90 |
#define EPFNOSUPPORT 123 |
| 91 |
#endif |
| 92 |
#ifndef EAFNOSUPPORT |
| 93 |
#define EAFNOSUPPORT 124 |
| 94 |
#endif |
| 95 |
#ifndef EADDRINUSE |
| 96 |
#define EADDRINUSE 125 |
| 97 |
#endif |
| 98 |
#ifndef EADDRNOTAVAIL |
| 99 |
#define EADDRNOTAVAIL 126 |
| 100 |
#endif |
| 101 |
#ifndef ENETDOWN |
| 102 |
#define ENETDOWN 127 |
| 103 |
#endif |
| 104 |
#ifndef ENETUNREACH |
| 105 |
#define ENETUNREACH 128 |
| 106 |
#endif |
| 107 |
#ifndef ENETRESET |
| 108 |
#define ENETRESET 129 |
| 109 |
#endif |
| 110 |
#ifndef ECONNABORTED |
| 111 |
#define ECONNABORTED 130 |
| 112 |
#endif |
| 113 |
#ifndef ECONNRESET |
| 114 |
#define ECONNRESET 131 |
| 115 |
#endif |
| 116 |
#ifndef ENOBUFS |
| 117 |
#define ENOBUFS 132 |
| 118 |
#endif |
| 119 |
#ifndef EISCONN |
| 120 |
#define EISCONN 133 |
| 121 |
#endif |
| 122 |
#ifndef ENOTCONN |
| 123 |
#define ENOTCONN 134 |
| 124 |
#endif |
| 125 |
#ifndef ESHUTDOWN |
| 126 |
#define ESHUTDOWN 143 |
| 127 |
#endif |
| 128 |
#ifndef ETOOMANYREFS |
| 129 |
#define ETOOMANYREFS 144 |
| 130 |
#endif |
| 131 |
#ifndef ETIMEDOUT |
| 132 |
#define ETIMEDOUT 145 |
| 133 |
#endif |
| 134 |
#ifndef ECONNREFUSED |
| 135 |
#define ECONNREFUSED 146 |
| 136 |
#endif |
| 137 |
#ifndef ELOOP |
| 138 |
#define ELOOP 90 |
| 139 |
#endif |
| 140 |
#ifndef EHOSTDOWN |
| 141 |
#define EHOSTDOWN 147 |
| 142 |
#endif |
| 143 |
#ifndef EHOSTUNREACH |
| 144 |
#define EHOSTUNREACH 148 |
| 145 |
#endif |
| 146 |
#ifndef ENOTEMPTY |
| 147 |
#define ENOTEMPTY 93 |
| 148 |
#endif |
| 149 |
#ifndef EUSERS |
| 150 |
#define EUSERS 94 |
| 151 |
#endif |
| 152 |
#ifndef EDQUOT |
| 153 |
#define EDQUOT 49 |
| 154 |
#endif |
| 155 |
#ifndef ESTALE |
| 156 |
#define ESTALE 151 |
| 157 |
#endif |
| 158 |
#ifndef EREMOTE |
| 159 |
#define EREMOTE 66 |
| 160 |
#endif |
| 161 |
|
| 162 |
#ifndef WIFEXITED |
| 163 |
# define WIFEXITED(stat) (((*((int *) &(stat))) & 0xff) == 0) |
| 164 |
#endif |
| 165 |
|
| 166 |
#ifndef WEXITSTATUS |
| 167 |
# define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff) |
| 168 |
#endif |
| 169 |
|
| 170 |
#ifndef WIFSIGNALED |
| 171 |
# define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff))) |
| 172 |
#endif |
| 173 |
|
| 174 |
#ifndef WTERMSIG |
| 175 |
# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7f) |
| 176 |
#endif |
| 177 |
|
| 178 |
#ifndef WIFSTOPPED |
| 179 |
# define WIFSTOPPED(stat) (((*((int *) &(stat))) & 0xff) == 0177) |
| 180 |
#endif |
| 181 |
|
| 182 |
#ifndef WSTOPSIG |
| 183 |
# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xff) |
| 184 |
#endif |
| 185 |
|
| 186 |
|
| 187 |
|
| 188 |
|
| 189 |
|
| 190 |
|
| 191 |
#ifndef WNOHANG |
| 192 |
# define WNOHANG 1 |
| 193 |
#endif |
| 194 |
#ifndef WUNTRACED |
| 195 |
# define WUNTRACED 2 |
| 196 |
#endif |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
|
| 201 |
|
| 202 |
|
| 203 |
#ifdef AIX |
| 204 |
# define WAIT_STATUS_TYPE pid_t |
| 205 |
#else |
| 206 |
#ifdef HAVE_UNION_WAIT |
| 207 |
# define WAIT_STATUS_TYPE union wait |
| 208 |
#else |
| 209 |
# define WAIT_STATUS_TYPE int |
| 210 |
#endif |
| 211 |
#endif |
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
#ifndef WIFEXITED |
| 219 |
# define WIFEXITED(stat) (((*((int *) &(stat))) & 0xff) == 0) |
| 220 |
#endif |
| 221 |
|
| 222 |
#ifndef WEXITSTATUS |
| 223 |
# define WEXITSTATUS(stat) (((*((int *) &(stat))) >> 8) & 0xff) |
| 224 |
#endif |
| 225 |
|
| 226 |
#ifndef WIFSIGNALED |
| 227 |
# define WIFSIGNALED(stat) (((*((int *) &(stat)))) && ((*((int *) &(stat))) == ((*((int *) &(stat))) & 0x00ff))) |
| 228 |
#endif |
| 229 |
|
| 230 |
#ifndef WTERMSIG |
| 231 |
# define WTERMSIG(stat) ((*((int *) &(stat))) & 0x7f) |
| 232 |
#endif |
| 233 |
|
| 234 |
#ifndef WIFSTOPPED |
| 235 |
# define WIFSTOPPED(stat) (((*((int *) &(stat))) & 0xff) == 0177) |
| 236 |
#endif |
| 237 |
|
| 238 |
#ifndef WSTOPSIG |
| 239 |
# define WSTOPSIG(stat) (((*((int *) &(stat))) >> 8) & 0xff) |
| 240 |
#endif |
| 241 |
|
| 242 |
#endif |