Debian Codegraph @

generic/bltWait.h

raw symbols SCIP
1 /*
2 * bltWait.h --
3 *
4 * Copyright 1993-1998 Lucent Technologies, Inc.
5 *
6 * Permission to use, copy, modify, and distribute this software and
7 * its documentation for any purpose and without fee is hereby
8 * granted, provided that the above copyright notice appear in all
9 * copies and that both that the copyright notice and warranty
10 * disclaimer appear in supporting documentation, and that the names
11 * of Lucent Technologies any of their entities not be used in
12 * advertising or publicity pertaining to distribution of the software
13 * without specific, written prior permission.
14 *
15 * Lucent Technologies disclaims all warranties with regard to this
16 * software, including all implied warranties of merchantability and
17 * fitness. In no event shall Lucent Technologies be liable for any
18 * special, indirect or consequential damages or any damages
19 * whatsoever resulting from loss of use, data or profits, whether in
20 * an action of contract, negligence or other tortuous action, arising
21 * out of or in connection with the use or performance of this
22 * software.
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 * Define EINPROGRESS in terms of WSAEINPROGRESS.
40 */
41
42 #ifndef EINPROGRESS
43 #define EINPROGRESS WSAEINPROGRESS
44 #endif
45
46 /*
47 * If ENOTSUP is not defined, define it to a value that will never occur.
48 */
49
50 #ifndef ENOTSUP
51 #define ENOTSUP -1030507
52 #endif
53
54 /*
55 * The following defines redefine the Windows Socket errors as
56 * BSD errors so Tcl_PosixError can do the right thing.
57 */
58
59 #ifndef EWOULDBLOCK
60 #define EWOULDBLOCK EAGAIN
61 #endif
62 #ifndef EALREADY
63 #define EALREADY 149 /* operation already in progress */
64 #endif
65 #ifndef ENOTSOCK
66 #define ENOTSOCK 95 /* Socket operation on non-socket */
67 #endif
68 #ifndef EDESTADDRREQ
69 #define EDESTADDRREQ 96 /* Destination address required */
70 #endif
71 #ifndef EMSGSIZE
72 #define EMSGSIZE 97 /* Message too long */
73 #endif
74 #ifndef EPROTOTYPE
75 #define EPROTOTYPE 98 /* Protocol wrong type for socket */
76 #endif
77 #ifndef ENOPROTOOPT
78 #define ENOPROTOOPT 99 /* Protocol not available */
79 #endif
80 #ifndef EPROTONOSUPPORT
81 #define EPROTONOSUPPORT 120 /* Protocol not supported */
82 #endif
83 #ifndef ESOCKTNOSUPPORT
84 #define ESOCKTNOSUPPORT 121 /* Socket type not supported */
85 #endif
86 #ifndef EOPNOTSUPP
87 #define EOPNOTSUPP 122 /* Operation not supported on socket */
88 #endif
89 #ifndef EPFNOSUPPORT
90 #define EPFNOSUPPORT 123 /* Protocol family not supported */
91 #endif
92 #ifndef EAFNOSUPPORT
93 #define EAFNOSUPPORT 124 /* Address family not supported */
94 #endif
95 #ifndef EADDRINUSE
96 #define EADDRINUSE 125 /* Address already in use */
97 #endif
98 #ifndef EADDRNOTAVAIL
99 #define EADDRNOTAVAIL 126 /* Can't assign requested address */
100 #endif
101 #ifndef ENETDOWN
102 #define ENETDOWN 127 /* Network is down */
103 #endif
104 #ifndef ENETUNREACH
105 #define ENETUNREACH 128 /* Network is unreachable */
106 #endif
107 #ifndef ENETRESET
108 #define ENETRESET 129 /* Network dropped connection on reset */
109 #endif
110 #ifndef ECONNABORTED
111 #define ECONNABORTED 130 /* Software caused connection abort */
112 #endif
113 #ifndef ECONNRESET
114 #define ECONNRESET 131 /* Connection reset by peer */
115 #endif
116 #ifndef ENOBUFS
117 #define ENOBUFS 132 /* No buffer space available */
118 #endif
119 #ifndef EISCONN
120 #define EISCONN 133 /* Socket is already connected */
121 #endif
122 #ifndef ENOTCONN
123 #define ENOTCONN 134 /* Socket is not connected */
124 #endif
125 #ifndef ESHUTDOWN
126 #define ESHUTDOWN 143 /* Can't send after socket shutdown */
127 #endif
128 #ifndef ETOOMANYREFS
129 #define ETOOMANYREFS 144 /* Too many references: can't splice */
130 #endif
131 #ifndef ETIMEDOUT
132 #define ETIMEDOUT 145 /* Connection timed out */
133 #endif
134 #ifndef ECONNREFUSED
135 #define ECONNREFUSED 146 /* Connection refused */
136 #endif
137 #ifndef ELOOP
138 #define ELOOP 90 /* Symbolic link loop */
139 #endif
140 #ifndef EHOSTDOWN
141 #define EHOSTDOWN 147 /* Host is down */
142 #endif
143 #ifndef EHOSTUNREACH
144 #define EHOSTUNREACH 148 /* No route to host */
145 #endif
146 #ifndef ENOTEMPTY
147 #define ENOTEMPTY 93 /* directory not empty */
148 #endif
149 #ifndef EUSERS
150 #define EUSERS 94 /* Too many users (for UFS) */
151 #endif
152 #ifndef EDQUOT
153 #define EDQUOT 49 /* Disc quota exceeded */
154 #endif
155 #ifndef ESTALE
156 #define ESTALE 151 /* Stale NFS file handle */
157 #endif
158 #ifndef EREMOTE
159 #define EREMOTE 66 /* The object is remote */
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 * Define constants for waitpid() system call if they aren't defined
188 * by a system header file.
189 */
190
191 #ifndef WNOHANG
192 # define WNOHANG 1
193 #endif
194 #ifndef WUNTRACED
195 # define WUNTRACED 2
196 #endif
197
198 /*
199 * The type of the status returned by wait varies from UNIX system
200 * to UNIX system. The macro below defines it:
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 * Supply definitions for macros to query wait status, if not already
215 * defined in header files above.
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 /* _BLT_WAIT_H */