/[dtapublic]/projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclposixstr.c
ViewVC logotype

Diff of /projs/trunk/shared_source/c_tcl_base_7_5_w_mods/tclposixstr.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 70 by dashley, Mon Oct 31 00:57:34 2016 UTC revision 71 by dashley, Sat Nov 5 11:07:06 2016 UTC
# Line 1  Line 1 
1  /* $Header$ */  /* $Header$ */
2  /*  /*
3   * tclPosixStr.c --   * tclPosixStr.c --
4   *   *
5   *      This file contains procedures that generate strings   *      This file contains procedures that generate strings
6   *      corresponding to various POSIX-related codes, such   *      corresponding to various POSIX-related codes, such
7   *      as errno and signals.   *      as errno and signals.
8   *   *
9   * Copyright (c) 1991-1994 The Regents of the University of California.   * Copyright (c) 1991-1994 The Regents of the University of California.
10   * Copyright (c) 1994-1996 Sun Microsystems, Inc.   * Copyright (c) 1994-1996 Sun Microsystems, Inc.
11   *   *
12   * See the file "license.terms" for information on usage and redistribution   * See the file "license.terms" for information on usage and redistribution
13   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.   * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
14   *   *
15   * RCS: @(#) $Id: tclposixstr.c,v 1.1.1.1 2001/06/13 04:45:10 dtashley Exp $   * RCS: @(#) $Id: tclposixstr.c,v 1.1.1.1 2001/06/13 04:45:10 dtashley Exp $
16   */   */
17    
18  #include "tclInt.h"  #include "tclInt.h"
19  #include "tclPort.h"  #include "tclPort.h"
20    
21  /*  /*
22   *----------------------------------------------------------------------   *----------------------------------------------------------------------
23   *   *
24   * Tcl_ErrnoId --   * Tcl_ErrnoId --
25   *   *
26   *      Return a textual identifier for the current errno value.   *      Return a textual identifier for the current errno value.
27   *   *
28   * Results:   * Results:
29   *      This procedure returns a machine-readable textual identifier   *      This procedure returns a machine-readable textual identifier
30   *      that corresponds to the current errno value (e.g. "EPERM").   *      that corresponds to the current errno value (e.g. "EPERM").
31   *      The identifier is the same as the #define name in errno.h.   *      The identifier is the same as the #define name in errno.h.
32   *   *
33   * Side effects:   * Side effects:
34   *      None.   *      None.
35   *   *
36   *----------------------------------------------------------------------   *----------------------------------------------------------------------
37   */   */
38    
39  char *  char *
40  Tcl_ErrnoId()  Tcl_ErrnoId()
41  {  {
42      switch (errno) {      switch (errno) {
43  #ifdef E2BIG  #ifdef E2BIG
44          case E2BIG: return "E2BIG";          case E2BIG: return "E2BIG";
45  #endif  #endif
46  #ifdef EACCES  #ifdef EACCES
47          case EACCES: return "EACCES";          case EACCES: return "EACCES";
48  #endif  #endif
49  #ifdef EADDRINUSE  #ifdef EADDRINUSE
50          case EADDRINUSE: return "EADDRINUSE";          case EADDRINUSE: return "EADDRINUSE";
51  #endif  #endif
52  #ifdef EADDRNOTAVAIL  #ifdef EADDRNOTAVAIL
53          case EADDRNOTAVAIL: return "EADDRNOTAVAIL";          case EADDRNOTAVAIL: return "EADDRNOTAVAIL";
54  #endif  #endif
55  #ifdef EADV  #ifdef EADV
56          case EADV: return "EADV";          case EADV: return "EADV";
57  #endif  #endif
58  #ifdef EAFNOSUPPORT  #ifdef EAFNOSUPPORT
59          case EAFNOSUPPORT: return "EAFNOSUPPORT";          case EAFNOSUPPORT: return "EAFNOSUPPORT";
60  #endif  #endif
61  #ifdef EAGAIN  #ifdef EAGAIN
62          case EAGAIN: return "EAGAIN";          case EAGAIN: return "EAGAIN";
63  #endif  #endif
64  #ifdef EALIGN  #ifdef EALIGN
65          case EALIGN: return "EALIGN";          case EALIGN: return "EALIGN";
66  #endif  #endif
67  #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY ))  #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY ))
68          case EALREADY: return "EALREADY";          case EALREADY: return "EALREADY";
69  #endif  #endif
70  #ifdef EBADE  #ifdef EBADE
71          case EBADE: return "EBADE";          case EBADE: return "EBADE";
72  #endif  #endif
73  #ifdef EBADF  #ifdef EBADF
74          case EBADF: return "EBADF";          case EBADF: return "EBADF";
75  #endif  #endif
76  #ifdef EBADFD  #ifdef EBADFD
77          case EBADFD: return "EBADFD";          case EBADFD: return "EBADFD";
78  #endif  #endif
79  #ifdef EBADMSG  #ifdef EBADMSG
80          case EBADMSG: return "EBADMSG";          case EBADMSG: return "EBADMSG";
81  #endif  #endif
82  #ifdef EBADR  #ifdef EBADR
83          case EBADR: return "EBADR";          case EBADR: return "EBADR";
84  #endif  #endif
85  #ifdef EBADRPC  #ifdef EBADRPC
86          case EBADRPC: return "EBADRPC";          case EBADRPC: return "EBADRPC";
87  #endif  #endif
88  #ifdef EBADRQC  #ifdef EBADRQC
89          case EBADRQC: return "EBADRQC";          case EBADRQC: return "EBADRQC";
90  #endif  #endif
91  #ifdef EBADSLT  #ifdef EBADSLT
92          case EBADSLT: return "EBADSLT";          case EBADSLT: return "EBADSLT";
93  #endif  #endif
94  #ifdef EBFONT  #ifdef EBFONT
95          case EBFONT: return "EBFONT";          case EBFONT: return "EBFONT";
96  #endif  #endif
97  #ifdef EBUSY  #ifdef EBUSY
98          case EBUSY: return "EBUSY";          case EBUSY: return "EBUSY";
99  #endif  #endif
100  #ifdef ECHILD  #ifdef ECHILD
101          case ECHILD: return "ECHILD";          case ECHILD: return "ECHILD";
102  #endif  #endif
103  #ifdef ECHRNG  #ifdef ECHRNG
104          case ECHRNG: return "ECHRNG";          case ECHRNG: return "ECHRNG";
105  #endif  #endif
106  #ifdef ECOMM  #ifdef ECOMM
107          case ECOMM: return "ECOMM";          case ECOMM: return "ECOMM";
108  #endif  #endif
109  #ifdef ECONNABORTED  #ifdef ECONNABORTED
110          case ECONNABORTED: return "ECONNABORTED";          case ECONNABORTED: return "ECONNABORTED";
111  #endif  #endif
112  #ifdef ECONNREFUSED  #ifdef ECONNREFUSED
113          case ECONNREFUSED: return "ECONNREFUSED";          case ECONNREFUSED: return "ECONNREFUSED";
114  #endif  #endif
115  #ifdef ECONNRESET  #ifdef ECONNRESET
116          case ECONNRESET: return "ECONNRESET";          case ECONNRESET: return "ECONNRESET";
117  #endif  #endif
118  #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))  #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
119          case EDEADLK: return "EDEADLK";          case EDEADLK: return "EDEADLK";
120  #endif  #endif
121  #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK))  #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK))
122          case EDEADLOCK: return "EDEADLOCK";          case EDEADLOCK: return "EDEADLOCK";
123  #endif  #endif
124  #ifdef EDESTADDRREQ  #ifdef EDESTADDRREQ
125          case EDESTADDRREQ: return "EDESTADDRREQ";          case EDESTADDRREQ: return "EDESTADDRREQ";
126  #endif  #endif
127  #ifdef EDIRTY  #ifdef EDIRTY
128          case EDIRTY: return "EDIRTY";          case EDIRTY: return "EDIRTY";
129  #endif  #endif
130  #ifdef EDOM  #ifdef EDOM
131          case EDOM: return "EDOM";          case EDOM: return "EDOM";
132  #endif  #endif
133  #ifdef EDOTDOT  #ifdef EDOTDOT
134          case EDOTDOT: return "EDOTDOT";          case EDOTDOT: return "EDOTDOT";
135  #endif  #endif
136  #ifdef EDQUOT  #ifdef EDQUOT
137          case EDQUOT: return "EDQUOT";          case EDQUOT: return "EDQUOT";
138  #endif  #endif
139  #ifdef EDUPPKG  #ifdef EDUPPKG
140          case EDUPPKG: return "EDUPPKG";          case EDUPPKG: return "EDUPPKG";
141  #endif  #endif
142  #ifdef EEXIST  #ifdef EEXIST
143          case EEXIST: return "EEXIST";          case EEXIST: return "EEXIST";
144  #endif  #endif
145  #ifdef EFAULT  #ifdef EFAULT
146          case EFAULT: return "EFAULT";          case EFAULT: return "EFAULT";
147  #endif  #endif
148  #ifdef EFBIG  #ifdef EFBIG
149          case EFBIG: return "EFBIG";          case EFBIG: return "EFBIG";
150  #endif  #endif
151  #ifdef EHOSTDOWN  #ifdef EHOSTDOWN
152          case EHOSTDOWN: return "EHOSTDOWN";          case EHOSTDOWN: return "EHOSTDOWN";
153  #endif  #endif
154  #ifdef EHOSTUNREACH  #ifdef EHOSTUNREACH
155          case EHOSTUNREACH: return "EHOSTUNREACH";          case EHOSTUNREACH: return "EHOSTUNREACH";
156  #endif  #endif
157  #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS))  #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS))
158          case EIDRM: return "EIDRM";          case EIDRM: return "EIDRM";
159  #endif  #endif
160  #ifdef EINIT  #ifdef EINIT
161          case EINIT: return "EINIT";          case EINIT: return "EINIT";
162  #endif  #endif
163  #ifdef EINPROGRESS  #ifdef EINPROGRESS
164          case EINPROGRESS: return "EINPROGRESS";          case EINPROGRESS: return "EINPROGRESS";
165  #endif  #endif
166  #ifdef EINTR  #ifdef EINTR
167          case EINTR: return "EINTR";          case EINTR: return "EINTR";
168  #endif  #endif
169  #ifdef EINVAL  #ifdef EINVAL
170          case EINVAL: return "EINVAL";          case EINVAL: return "EINVAL";
171  #endif  #endif
172  #ifdef EIO  #ifdef EIO
173          case EIO: return "EIO";          case EIO: return "EIO";
174  #endif  #endif
175  #ifdef EISCONN  #ifdef EISCONN
176          case EISCONN: return "EISCONN";          case EISCONN: return "EISCONN";
177  #endif  #endif
178  #ifdef EISDIR  #ifdef EISDIR
179          case EISDIR: return "EISDIR";          case EISDIR: return "EISDIR";
180  #endif  #endif
181  #ifdef EISNAME  #ifdef EISNAME
182          case EISNAM: return "EISNAM";          case EISNAM: return "EISNAM";
183  #endif  #endif
184  #ifdef ELBIN  #ifdef ELBIN
185          case ELBIN: return "ELBIN";          case ELBIN: return "ELBIN";
186  #endif  #endif
187  #ifdef EL2HLT  #ifdef EL2HLT
188          case EL2HLT: return "EL2HLT";          case EL2HLT: return "EL2HLT";
189  #endif  #endif
190  #ifdef EL2NSYNC  #ifdef EL2NSYNC
191          case EL2NSYNC: return "EL2NSYNC";          case EL2NSYNC: return "EL2NSYNC";
192  #endif  #endif
193  #ifdef EL3HLT  #ifdef EL3HLT
194          case EL3HLT: return "EL3HLT";          case EL3HLT: return "EL3HLT";
195  #endif  #endif
196  #ifdef EL3RST  #ifdef EL3RST
197          case EL3RST: return "EL3RST";          case EL3RST: return "EL3RST";
198  #endif  #endif
199  #ifdef ELIBACC  #ifdef ELIBACC
200          case ELIBACC: return "ELIBACC";          case ELIBACC: return "ELIBACC";
201  #endif  #endif
202  #ifdef ELIBBAD  #ifdef ELIBBAD
203          case ELIBBAD: return "ELIBBAD";          case ELIBBAD: return "ELIBBAD";
204  #endif  #endif
205  #ifdef ELIBEXEC  #ifdef ELIBEXEC
206          case ELIBEXEC: return "ELIBEXEC";          case ELIBEXEC: return "ELIBEXEC";
207  #endif  #endif
208  #ifdef ELIBMAX  #ifdef ELIBMAX
209          case ELIBMAX: return "ELIBMAX";          case ELIBMAX: return "ELIBMAX";
210  #endif  #endif
211  #ifdef ELIBSCN  #ifdef ELIBSCN
212          case ELIBSCN: return "ELIBSCN";          case ELIBSCN: return "ELIBSCN";
213  #endif  #endif
214  #ifdef ELNRNG  #ifdef ELNRNG
215          case ELNRNG: return "ELNRNG";          case ELNRNG: return "ELNRNG";
216  #endif  #endif
217  #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))  #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))
218          case ELOOP: return "ELOOP";          case ELOOP: return "ELOOP";
219  #endif  #endif
220  #ifdef EMFILE  #ifdef EMFILE
221          case EMFILE: return "EMFILE";          case EMFILE: return "EMFILE";
222  #endif  #endif
223  #ifdef EMLINK  #ifdef EMLINK
224          case EMLINK: return "EMLINK";          case EMLINK: return "EMLINK";
225  #endif  #endif
226  #ifdef EMSGSIZE  #ifdef EMSGSIZE
227          case EMSGSIZE: return "EMSGSIZE";          case EMSGSIZE: return "EMSGSIZE";
228  #endif  #endif
229  #ifdef EMULTIHOP  #ifdef EMULTIHOP
230          case EMULTIHOP: return "EMULTIHOP";          case EMULTIHOP: return "EMULTIHOP";
231  #endif  #endif
232  #ifdef ENAMETOOLONG  #ifdef ENAMETOOLONG
233          case ENAMETOOLONG: return "ENAMETOOLONG";          case ENAMETOOLONG: return "ENAMETOOLONG";
234  #endif  #endif
235  #ifdef ENAVAIL  #ifdef ENAVAIL
236          case ENAVAIL: return "ENAVAIL";          case ENAVAIL: return "ENAVAIL";
237  #endif  #endif
238  #ifdef ENET  #ifdef ENET
239          case ENET: return "ENET";          case ENET: return "ENET";
240  #endif  #endif
241  #ifdef ENETDOWN  #ifdef ENETDOWN
242          case ENETDOWN: return "ENETDOWN";          case ENETDOWN: return "ENETDOWN";
243  #endif  #endif
244  #ifdef ENETRESET  #ifdef ENETRESET
245          case ENETRESET: return "ENETRESET";          case ENETRESET: return "ENETRESET";
246  #endif  #endif
247  #ifdef ENETUNREACH  #ifdef ENETUNREACH
248          case ENETUNREACH: return "ENETUNREACH";          case ENETUNREACH: return "ENETUNREACH";
249  #endif  #endif
250  #ifdef ENFILE  #ifdef ENFILE
251          case ENFILE: return "ENFILE";          case ENFILE: return "ENFILE";
252  #endif  #endif
253  #ifdef ENOANO  #ifdef ENOANO
254          case ENOANO: return "ENOANO";          case ENOANO: return "ENOANO";
255  #endif  #endif
256  #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))  #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))
257          case ENOBUFS: return "ENOBUFS";          case ENOBUFS: return "ENOBUFS";
258  #endif  #endif
259  #ifdef ENOCSI  #ifdef ENOCSI
260          case ENOCSI: return "ENOCSI";          case ENOCSI: return "ENOCSI";
261  #endif  #endif
262  #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED))  #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED))
263          case ENODATA: return "ENODATA";          case ENODATA: return "ENODATA";
264  #endif  #endif
265  #ifdef ENODEV  #ifdef ENODEV
266          case ENODEV: return "ENODEV";          case ENODEV: return "ENODEV";
267  #endif  #endif
268  #ifdef ENOENT  #ifdef ENOENT
269          case ENOENT: return "ENOENT";          case ENOENT: return "ENOENT";
270  #endif  #endif
271  #ifdef ENOEXEC  #ifdef ENOEXEC
272          case ENOEXEC: return "ENOEXEC";          case ENOEXEC: return "ENOEXEC";
273  #endif  #endif
274  #ifdef ENOLCK  #ifdef ENOLCK
275          case ENOLCK: return "ENOLCK";          case ENOLCK: return "ENOLCK";
276  #endif  #endif
277  #ifdef ENOLINK  #ifdef ENOLINK
278          case ENOLINK: return "ENOLINK";          case ENOLINK: return "ENOLINK";
279  #endif  #endif
280  #ifdef ENOMEM  #ifdef ENOMEM
281          case ENOMEM: return "ENOMEM";          case ENOMEM: return "ENOMEM";
282  #endif  #endif
283  #ifdef ENOMSG  #ifdef ENOMSG
284          case ENOMSG: return "ENOMSG";          case ENOMSG: return "ENOMSG";
285  #endif  #endif
286  #ifdef ENONET  #ifdef ENONET
287          case ENONET: return "ENONET";          case ENONET: return "ENONET";
288  #endif  #endif
289  #ifdef ENOPKG  #ifdef ENOPKG
290          case ENOPKG: return "ENOPKG";          case ENOPKG: return "ENOPKG";
291  #endif  #endif
292  #ifdef ENOPROTOOPT  #ifdef ENOPROTOOPT
293          case ENOPROTOOPT: return "ENOPROTOOPT";          case ENOPROTOOPT: return "ENOPROTOOPT";
294  #endif  #endif
295  #ifdef ENOSPC  #ifdef ENOSPC
296          case ENOSPC: return "ENOSPC";          case ENOSPC: return "ENOSPC";
297  #endif  #endif
298  #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR))  #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR))
299          case ENOSR: return "ENOSR";          case ENOSR: return "ENOSR";
300  #endif  #endif
301  #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR))  #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR))
302          case ENOSTR: return "ENOSTR";          case ENOSTR: return "ENOSTR";
303  #endif  #endif
304  #ifdef ENOSYM  #ifdef ENOSYM
305          case ENOSYM: return "ENOSYM";          case ENOSYM: return "ENOSYM";
306  #endif  #endif
307  #ifdef ENOSYS  #ifdef ENOSYS
308          case ENOSYS: return "ENOSYS";          case ENOSYS: return "ENOSYS";
309  #endif  #endif
310  #ifdef ENOTBLK  #ifdef ENOTBLK
311          case ENOTBLK: return "ENOTBLK";          case ENOTBLK: return "ENOTBLK";
312  #endif  #endif
313  #ifdef ENOTCONN  #ifdef ENOTCONN
314          case ENOTCONN: return "ENOTCONN";          case ENOTCONN: return "ENOTCONN";
315  #endif  #endif
316  #ifdef ENOTDIR  #ifdef ENOTDIR
317          case ENOTDIR: return "ENOTDIR";          case ENOTDIR: return "ENOTDIR";
318  #endif  #endif
319  #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))  #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))
320          case ENOTEMPTY: return "ENOTEMPTY";          case ENOTEMPTY: return "ENOTEMPTY";
321  #endif  #endif
322  #ifdef ENOTNAM  #ifdef ENOTNAM
323          case ENOTNAM: return "ENOTNAM";          case ENOTNAM: return "ENOTNAM";
324  #endif  #endif
325  #ifdef ENOTSOCK  #ifdef ENOTSOCK
326          case ENOTSOCK: return "ENOTSOCK";          case ENOTSOCK: return "ENOTSOCK";
327  #endif  #endif
328  #ifdef ENOTSUP  #ifdef ENOTSUP
329          case ENOTSUP: return "ENOTSUP";          case ENOTSUP: return "ENOTSUP";
330  #endif  #endif
331  #ifdef ENOTTY  #ifdef ENOTTY
332          case ENOTTY: return "ENOTTY";          case ENOTTY: return "ENOTTY";
333  #endif  #endif
334  #ifdef ENOTUNIQ  #ifdef ENOTUNIQ
335          case ENOTUNIQ: return "ENOTUNIQ";          case ENOTUNIQ: return "ENOTUNIQ";
336  #endif  #endif
337  #ifdef ENXIO  #ifdef ENXIO
338          case ENXIO: return "ENXIO";          case ENXIO: return "ENXIO";
339  #endif  #endif
340  #if defined(EOPNOTSUPP) &&  (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))  #if defined(EOPNOTSUPP) &&  (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
341          case EOPNOTSUPP: return "EOPNOTSUPP";          case EOPNOTSUPP: return "EOPNOTSUPP";
342  #endif  #endif
343  #ifdef EPERM  #ifdef EPERM
344          case EPERM: return "EPERM";          case EPERM: return "EPERM";
345  #endif  #endif
346  #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))  #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))
347          case EPFNOSUPPORT: return "EPFNOSUPPORT";          case EPFNOSUPPORT: return "EPFNOSUPPORT";
348  #endif  #endif
349  #ifdef EPIPE  #ifdef EPIPE
350          case EPIPE: return "EPIPE";          case EPIPE: return "EPIPE";
351  #endif  #endif
352  #ifdef EPROCLIM  #ifdef EPROCLIM
353          case EPROCLIM: return "EPROCLIM";          case EPROCLIM: return "EPROCLIM";
354  #endif  #endif
355  #ifdef EPROCUNAVAIL  #ifdef EPROCUNAVAIL
356          case EPROCUNAVAIL: return "EPROCUNAVAIL";          case EPROCUNAVAIL: return "EPROCUNAVAIL";
357  #endif  #endif
358  #ifdef EPROGMISMATCH  #ifdef EPROGMISMATCH
359          case EPROGMISMATCH: return "EPROGMISMATCH";          case EPROGMISMATCH: return "EPROGMISMATCH";
360  #endif  #endif
361  #ifdef EPROGUNAVAIL  #ifdef EPROGUNAVAIL
362          case EPROGUNAVAIL: return "EPROGUNAVAIL";          case EPROGUNAVAIL: return "EPROGUNAVAIL";
363  #endif  #endif
364  #ifdef EPROTO  #ifdef EPROTO
365          case EPROTO: return "EPROTO";          case EPROTO: return "EPROTO";
366  #endif  #endif
367  #ifdef EPROTONOSUPPORT  #ifdef EPROTONOSUPPORT
368          case EPROTONOSUPPORT: return "EPROTONOSUPPORT";          case EPROTONOSUPPORT: return "EPROTONOSUPPORT";
369  #endif  #endif
370  #ifdef EPROTOTYPE  #ifdef EPROTOTYPE
371          case EPROTOTYPE: return "EPROTOTYPE";          case EPROTOTYPE: return "EPROTOTYPE";
372  #endif  #endif
373  #ifdef ERANGE  #ifdef ERANGE
374          case ERANGE: return "ERANGE";          case ERANGE: return "ERANGE";
375  #endif  #endif
376  #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))  #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))
377          case EREFUSED: return "EREFUSED";          case EREFUSED: return "EREFUSED";
378  #endif  #endif
379  #ifdef EREMCHG  #ifdef EREMCHG
380          case EREMCHG: return "EREMCHG";          case EREMCHG: return "EREMCHG";
381  #endif  #endif
382  #ifdef EREMDEV  #ifdef EREMDEV
383          case EREMDEV: return "EREMDEV";          case EREMDEV: return "EREMDEV";
384  #endif  #endif
385  #ifdef EREMOTE  #ifdef EREMOTE
386          case EREMOTE: return "EREMOTE";          case EREMOTE: return "EREMOTE";
387  #endif  #endif
388  #ifdef EREMOTEIO  #ifdef EREMOTEIO
389          case EREMOTEIO: return "EREMOTEIO";          case EREMOTEIO: return "EREMOTEIO";
390  #endif  #endif
391  #ifdef EREMOTERELEASE  #ifdef EREMOTERELEASE
392          case EREMOTERELEASE: return "EREMOTERELEASE";          case EREMOTERELEASE: return "EREMOTERELEASE";
393  #endif  #endif
394  #ifdef EROFS  #ifdef EROFS
395          case EROFS: return "EROFS";          case EROFS: return "EROFS";
396  #endif  #endif
397  #ifdef ERPCMISMATCH  #ifdef ERPCMISMATCH
398          case ERPCMISMATCH: return "ERPCMISMATCH";          case ERPCMISMATCH: return "ERPCMISMATCH";
399  #endif  #endif
400  #ifdef ERREMOTE  #ifdef ERREMOTE
401          case ERREMOTE: return "ERREMOTE";          case ERREMOTE: return "ERREMOTE";
402  #endif  #endif
403  #ifdef ESHUTDOWN  #ifdef ESHUTDOWN
404          case ESHUTDOWN: return "ESHUTDOWN";          case ESHUTDOWN: return "ESHUTDOWN";
405  #endif  #endif
406  #ifdef ESOCKTNOSUPPORT  #ifdef ESOCKTNOSUPPORT
407          case ESOCKTNOSUPPORT: return "ESOCKTNOSUPPORT";          case ESOCKTNOSUPPORT: return "ESOCKTNOSUPPORT";
408  #endif  #endif
409  #ifdef ESPIPE  #ifdef ESPIPE
410          case ESPIPE: return "ESPIPE";          case ESPIPE: return "ESPIPE";
411  #endif  #endif
412  #ifdef ESRCH  #ifdef ESRCH
413          case ESRCH: return "ESRCH";          case ESRCH: return "ESRCH";
414  #endif  #endif
415  #ifdef ESRMNT  #ifdef ESRMNT
416          case ESRMNT: return "ESRMNT";          case ESRMNT: return "ESRMNT";
417  #endif  #endif
418  #ifdef ESTALE  #ifdef ESTALE
419          case ESTALE: return "ESTALE";          case ESTALE: return "ESTALE";
420  #endif  #endif
421  #ifdef ESUCCESS  #ifdef ESUCCESS
422          case ESUCCESS: return "ESUCCESS";          case ESUCCESS: return "ESUCCESS";
423  #endif  #endif
424  #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))  #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))
425          case ETIME: return "ETIME";          case ETIME: return "ETIME";
426  #endif  #endif
427  #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))  #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))
428          case ETIMEDOUT: return "ETIMEDOUT";          case ETIMEDOUT: return "ETIMEDOUT";
429  #endif  #endif
430  #ifdef ETOOMANYREFS  #ifdef ETOOMANYREFS
431          case ETOOMANYREFS: return "ETOOMANYREFS";          case ETOOMANYREFS: return "ETOOMANYREFS";
432  #endif  #endif
433  #ifdef ETXTBSY  #ifdef ETXTBSY
434          case ETXTBSY: return "ETXTBSY";          case ETXTBSY: return "ETXTBSY";
435  #endif  #endif
436  #ifdef EUCLEAN  #ifdef EUCLEAN
437          case EUCLEAN: return "EUCLEAN";          case EUCLEAN: return "EUCLEAN";
438  #endif  #endif
439  #ifdef EUNATCH  #ifdef EUNATCH
440          case EUNATCH: return "EUNATCH";          case EUNATCH: return "EUNATCH";
441  #endif  #endif
442  #ifdef EUSERS  #ifdef EUSERS
443          case EUSERS: return "EUSERS";          case EUSERS: return "EUSERS";
444  #endif  #endif
445  #ifdef EVERSION  #ifdef EVERSION
446          case EVERSION: return "EVERSION";          case EVERSION: return "EVERSION";
447  #endif  #endif
448  #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))  #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
449          case EWOULDBLOCK: return "EWOULDBLOCK";          case EWOULDBLOCK: return "EWOULDBLOCK";
450  #endif  #endif
451  #ifdef EXDEV  #ifdef EXDEV
452          case EXDEV: return "EXDEV";          case EXDEV: return "EXDEV";
453  #endif  #endif
454  #ifdef EXFULL  #ifdef EXFULL
455          case EXFULL: return "EXFULL";          case EXFULL: return "EXFULL";
456  #endif  #endif
457      }      }
458      return "unknown error";      return "unknown error";
459  }  }
460    
461  /*  /*
462   *----------------------------------------------------------------------   *----------------------------------------------------------------------
463   *   *
464   * Tcl_ErrnoMsg --   * Tcl_ErrnoMsg --
465   *   *
466   *      Return a human-readable message corresponding to a given   *      Return a human-readable message corresponding to a given
467   *      errno value.   *      errno value.
468   *   *
469   * Results:   * Results:
470   *      The return value is the standard POSIX error message for   *      The return value is the standard POSIX error message for
471   *      errno.  This procedure is used instead of strerror because   *      errno.  This procedure is used instead of strerror because
472   *      strerror returns slightly different values on different   *      strerror returns slightly different values on different
473   *      machines (e.g. different capitalizations), which cause   *      machines (e.g. different capitalizations), which cause
474   *      problems for things such as regression tests.  This procedure   *      problems for things such as regression tests.  This procedure
475   *      provides messages for most standard errors, then it calls   *      provides messages for most standard errors, then it calls
476   *      strerror for things it doesn't understand.   *      strerror for things it doesn't understand.
477   *   *
478   * Side effects:   * Side effects:
479   *      None.   *      None.
480   *   *
481   *----------------------------------------------------------------------   *----------------------------------------------------------------------
482   */   */
483    
484  char *  char *
485  Tcl_ErrnoMsg(err)  Tcl_ErrnoMsg(err)
486      int err;                    /* Error number (such as in errno variable). */      int err;                    /* Error number (such as in errno variable). */
487  {  {
488      switch (err) {      switch (err) {
489  #ifdef E2BIG  #ifdef E2BIG
490          case E2BIG: return "argument list too long";          case E2BIG: return "argument list too long";
491  #endif  #endif
492  #ifdef EACCES  #ifdef EACCES
493          case EACCES: return "permission denied";          case EACCES: return "permission denied";
494  #endif  #endif
495  #ifdef EADDRINUSE  #ifdef EADDRINUSE
496          case EADDRINUSE: return "address already in use";          case EADDRINUSE: return "address already in use";
497  #endif  #endif
498  #ifdef EADDRNOTAVAIL  #ifdef EADDRNOTAVAIL
499          case EADDRNOTAVAIL: return "can't assign requested address";          case EADDRNOTAVAIL: return "can't assign requested address";
500  #endif  #endif
501  #ifdef EADV  #ifdef EADV
502          case EADV: return "advertise error";          case EADV: return "advertise error";
503  #endif  #endif
504  #ifdef EAFNOSUPPORT  #ifdef EAFNOSUPPORT
505          case EAFNOSUPPORT: return "address family not supported by protocol family";          case EAFNOSUPPORT: return "address family not supported by protocol family";
506  #endif  #endif
507  #ifdef EAGAIN  #ifdef EAGAIN
508          case EAGAIN: return "resource temporarily unavailable";          case EAGAIN: return "resource temporarily unavailable";
509  #endif  #endif
510  #ifdef EALIGN  #ifdef EALIGN
511          case EALIGN: return "EALIGN";          case EALIGN: return "EALIGN";
512  #endif  #endif
513  #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY ))  #if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY ))
514          case EALREADY: return "operation already in progress";          case EALREADY: return "operation already in progress";
515  #endif  #endif
516  #ifdef EBADE  #ifdef EBADE
517          case EBADE: return "bad exchange descriptor";          case EBADE: return "bad exchange descriptor";
518  #endif  #endif
519  #ifdef EBADF  #ifdef EBADF
520          case EBADF: return "bad file number";          case EBADF: return "bad file number";
521  #endif  #endif
522  #ifdef EBADFD  #ifdef EBADFD
523          case EBADFD: return "file descriptor in bad state";          case EBADFD: return "file descriptor in bad state";
524  #endif  #endif
525  #ifdef EBADMSG  #ifdef EBADMSG
526          case EBADMSG: return "not a data message";          case EBADMSG: return "not a data message";
527  #endif  #endif
528  #ifdef EBADR  #ifdef EBADR
529          case EBADR: return "bad request descriptor";          case EBADR: return "bad request descriptor";
530  #endif  #endif
531  #ifdef EBADRPC  #ifdef EBADRPC
532          case EBADRPC: return "RPC structure is bad";          case EBADRPC: return "RPC structure is bad";
533  #endif  #endif
534  #ifdef EBADRQC  #ifdef EBADRQC
535          case EBADRQC: return "bad request code";          case EBADRQC: return "bad request code";
536  #endif  #endif
537  #ifdef EBADSLT  #ifdef EBADSLT
538          case EBADSLT: return "invalid slot";          case EBADSLT: return "invalid slot";
539  #endif  #endif
540  #ifdef EBFONT  #ifdef EBFONT
541          case EBFONT: return "bad font file format";          case EBFONT: return "bad font file format";
542  #endif  #endif
543  #ifdef EBUSY  #ifdef EBUSY
544          case EBUSY: return "file busy";          case EBUSY: return "file busy";
545  #endif  #endif
546  #ifdef ECHILD  #ifdef ECHILD
547          case ECHILD: return "no children";          case ECHILD: return "no children";
548  #endif  #endif
549  #ifdef ECHRNG  #ifdef ECHRNG
550          case ECHRNG: return "channel number out of range";          case ECHRNG: return "channel number out of range";
551  #endif  #endif
552  #ifdef ECOMM  #ifdef ECOMM
553          case ECOMM: return "communication error on send";          case ECOMM: return "communication error on send";
554  #endif  #endif
555  #ifdef ECONNABORTED  #ifdef ECONNABORTED
556          case ECONNABORTED: return "software caused connection abort";          case ECONNABORTED: return "software caused connection abort";
557  #endif  #endif
558  #ifdef ECONNREFUSED  #ifdef ECONNREFUSED
559          case ECONNREFUSED: return "connection refused";          case ECONNREFUSED: return "connection refused";
560  #endif  #endif
561  #ifdef ECONNRESET  #ifdef ECONNRESET
562          case ECONNRESET: return "connection reset by peer";          case ECONNRESET: return "connection reset by peer";
563  #endif  #endif
564  #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))  #if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
565          case EDEADLK: return "resource deadlock avoided";          case EDEADLK: return "resource deadlock avoided";
566  #endif  #endif
567  #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK))  #if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK))
568          case EDEADLOCK: return "resource deadlock avoided";          case EDEADLOCK: return "resource deadlock avoided";
569  #endif  #endif
570  #ifdef EDESTADDRREQ  #ifdef EDESTADDRREQ
571          case EDESTADDRREQ: return "destination address required";          case EDESTADDRREQ: return "destination address required";
572  #endif  #endif
573  #ifdef EDIRTY  #ifdef EDIRTY
574          case EDIRTY: return "mounting a dirty fs w/o force";          case EDIRTY: return "mounting a dirty fs w/o force";
575  #endif  #endif
576  #ifdef EDOM  #ifdef EDOM
577          case EDOM: return "math argument out of range";          case EDOM: return "math argument out of range";
578  #endif  #endif
579  #ifdef EDOTDOT  #ifdef EDOTDOT
580          case EDOTDOT: return "cross mount point";          case EDOTDOT: return "cross mount point";
581  #endif  #endif
582  #ifdef EDQUOT  #ifdef EDQUOT
583          case EDQUOT: return "disk quota exceeded";          case EDQUOT: return "disk quota exceeded";
584  #endif  #endif
585  #ifdef EDUPPKG  #ifdef EDUPPKG
586          case EDUPPKG: return "duplicate package name";          case EDUPPKG: return "duplicate package name";
587  #endif  #endif
588  #ifdef EEXIST  #ifdef EEXIST
589          case EEXIST: return "file already exists";          case EEXIST: return "file already exists";
590  #endif  #endif
591  #ifdef EFAULT  #ifdef EFAULT
592          case EFAULT: return "bad address in system call argument";          case EFAULT: return "bad address in system call argument";
593  #endif  #endif
594  #ifdef EFBIG  #ifdef EFBIG
595          case EFBIG: return "file too large";          case EFBIG: return "file too large";
596  #endif  #endif
597  #ifdef EHOSTDOWN  #ifdef EHOSTDOWN
598          case EHOSTDOWN: return "host is down";          case EHOSTDOWN: return "host is down";
599  #endif  #endif
600  #ifdef EHOSTUNREACH  #ifdef EHOSTUNREACH
601          case EHOSTUNREACH: return "host is unreachable";          case EHOSTUNREACH: return "host is unreachable";
602  #endif  #endif
603  #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS))  #if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS))
604          case EIDRM: return "identifier removed";          case EIDRM: return "identifier removed";
605  #endif  #endif
606  #ifdef EINIT  #ifdef EINIT
607          case EINIT: return "initialization error";          case EINIT: return "initialization error";
608  #endif  #endif
609  #ifdef EINPROGRESS  #ifdef EINPROGRESS
610          case EINPROGRESS: return "operation now in progress";          case EINPROGRESS: return "operation now in progress";
611  #endif  #endif
612  #ifdef EINTR  #ifdef EINTR
613          case EINTR: return "interrupted system call";          case EINTR: return "interrupted system call";
614  #endif  #endif
615  #ifdef EINVAL  #ifdef EINVAL
616          case EINVAL: return "invalid argument";          case EINVAL: return "invalid argument";
617  #endif  #endif
618  #ifdef EIO  #ifdef EIO
619          case EIO: return "I/O error";          case EIO: return "I/O error";
620  #endif  #endif
621  #ifdef EISCONN  #ifdef EISCONN
622          case EISCONN: return "socket is already connected";          case EISCONN: return "socket is already connected";
623  #endif  #endif
624  #ifdef EISDIR  #ifdef EISDIR
625          case EISDIR: return "illegal operation on a directory";          case EISDIR: return "illegal operation on a directory";
626  #endif  #endif
627  #ifdef EISNAME  #ifdef EISNAME
628          case EISNAM: return "is a name file";          case EISNAM: return "is a name file";
629  #endif  #endif
630  #ifdef ELBIN  #ifdef ELBIN
631          case ELBIN: return "ELBIN";          case ELBIN: return "ELBIN";
632  #endif  #endif
633  #ifdef EL2HLT  #ifdef EL2HLT
634          case EL2HLT: return "level 2 halted";          case EL2HLT: return "level 2 halted";
635  #endif  #endif
636  #ifdef EL2NSYNC  #ifdef EL2NSYNC
637          case EL2NSYNC: return "level 2 not synchronized";          case EL2NSYNC: return "level 2 not synchronized";
638  #endif  #endif
639  #ifdef EL3HLT  #ifdef EL3HLT
640          case EL3HLT: return "level 3 halted";          case EL3HLT: return "level 3 halted";
641  #endif  #endif
642  #ifdef EL3RST  #ifdef EL3RST
643          case EL3RST: return "level 3 reset";          case EL3RST: return "level 3 reset";
644  #endif  #endif
645  #ifdef ELIBACC  #ifdef ELIBACC
646          case ELIBACC: return "can not access a needed shared library";          case ELIBACC: return "can not access a needed shared library";
647  #endif  #endif
648  #ifdef ELIBBAD  #ifdef ELIBBAD
649          case ELIBBAD: return "accessing a corrupted shared library";          case ELIBBAD: return "accessing a corrupted shared library";
650  #endif  #endif
651  #ifdef ELIBEXEC  #ifdef ELIBEXEC
652          case ELIBEXEC: return "can not exec a shared library directly";          case ELIBEXEC: return "can not exec a shared library directly";
653  #endif  #endif
654  #ifdef ELIBMAX  #ifdef ELIBMAX
655          case ELIBMAX: return          case ELIBMAX: return
656                  "attempting to link in more shared libraries than system limit";                  "attempting to link in more shared libraries than system limit";
657  #endif  #endif
658  #ifdef ELIBSCN  #ifdef ELIBSCN
659          case ELIBSCN: return ".lib section in a.out corrupted";          case ELIBSCN: return ".lib section in a.out corrupted";
660  #endif  #endif
661  #ifdef ELNRNG  #ifdef ELNRNG
662          case ELNRNG: return "link number out of range";          case ELNRNG: return "link number out of range";
663  #endif  #endif
664  #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))  #if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))
665          case ELOOP: return "too many levels of symbolic links";          case ELOOP: return "too many levels of symbolic links";
666  #endif  #endif
667  #ifdef EMFILE  #ifdef EMFILE
668          case EMFILE: return "too many open files";          case EMFILE: return "too many open files";
669  #endif  #endif
670  #ifdef EMLINK  #ifdef EMLINK
671          case EMLINK: return "too many links";          case EMLINK: return "too many links";
672  #endif  #endif
673  #ifdef EMSGSIZE  #ifdef EMSGSIZE
674          case EMSGSIZE: return "message too long";          case EMSGSIZE: return "message too long";
675  #endif  #endif
676  #ifdef EMULTIHOP  #ifdef EMULTIHOP
677          case EMULTIHOP: return "multihop attempted";          case EMULTIHOP: return "multihop attempted";
678  #endif  #endif
679  #ifdef ENAMETOOLONG  #ifdef ENAMETOOLONG
680          case ENAMETOOLONG: return "file name too long";          case ENAMETOOLONG: return "file name too long";
681  #endif  #endif
682  #ifdef ENAVAIL  #ifdef ENAVAIL
683          case ENAVAIL: return "not available";          case ENAVAIL: return "not available";
684  #endif  #endif
685  #ifdef ENET  #ifdef ENET
686          case ENET: return "ENET";          case ENET: return "ENET";
687  #endif  #endif
688  #ifdef ENETDOWN  #ifdef ENETDOWN
689          case ENETDOWN: return "network is down";          case ENETDOWN: return "network is down";
690  #endif  #endif
691  #ifdef ENETRESET  #ifdef ENETRESET
692          case ENETRESET: return "network dropped connection on reset";          case ENETRESET: return "network dropped connection on reset";
693  #endif  #endif
694  #ifdef ENETUNREACH  #ifdef ENETUNREACH
695          case ENETUNREACH: return "network is unreachable";          case ENETUNREACH: return "network is unreachable";
696  #endif  #endif
697  #ifdef ENFILE  #ifdef ENFILE
698          case ENFILE: return "file table overflow";          case ENFILE: return "file table overflow";
699  #endif  #endif
700  #ifdef ENOANO  #ifdef ENOANO
701          case ENOANO: return "anode table overflow";          case ENOANO: return "anode table overflow";
702  #endif  #endif
703  #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))  #if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))
704          case ENOBUFS: return "no buffer space available";          case ENOBUFS: return "no buffer space available";
705  #endif  #endif
706  #ifdef ENOCSI  #ifdef ENOCSI
707          case ENOCSI: return "no CSI structure available";          case ENOCSI: return "no CSI structure available";
708  #endif  #endif
709  #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED))  #if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED))
710          case ENODATA: return "no data available";          case ENODATA: return "no data available";
711  #endif  #endif
712  #ifdef ENODEV  #ifdef ENODEV
713          case ENODEV: return "no such device";          case ENODEV: return "no such device";
714  #endif  #endif
715  #ifdef ENOENT  #ifdef ENOENT
716          case ENOENT: return "no such file or directory";          case ENOENT: return "no such file or directory";
717  #endif  #endif
718  #ifdef ENOEXEC  #ifdef ENOEXEC
719          case ENOEXEC: return "exec format error";          case ENOEXEC: return "exec format error";
720  #endif  #endif
721  #ifdef ENOLCK  #ifdef ENOLCK
722          case ENOLCK: return "no locks available";          case ENOLCK: return "no locks available";
723  #endif  #endif
724  #ifdef ENOLINK  #ifdef ENOLINK
725          case ENOLINK: return "link has be severed";          case ENOLINK: return "link has be severed";
726  #endif  #endif
727  #ifdef ENOMEM  #ifdef ENOMEM
728          case ENOMEM: return "not enough memory";          case ENOMEM: return "not enough memory";
729  #endif  #endif
730  #ifdef ENOMSG  #ifdef ENOMSG
731          case ENOMSG: return "no message of desired type";          case ENOMSG: return "no message of desired type";
732  #endif  #endif
733  #ifdef ENONET  #ifdef ENONET
734          case ENONET: return "machine is not on the network";          case ENONET: return "machine is not on the network";
735  #endif  #endif
736  #ifdef ENOPKG  #ifdef ENOPKG
737          case ENOPKG: return "package not installed";          case ENOPKG: return "package not installed";
738  #endif  #endif
739  #ifdef ENOPROTOOPT  #ifdef ENOPROTOOPT
740          case ENOPROTOOPT: return "bad protocol option";          case ENOPROTOOPT: return "bad protocol option";
741  #endif  #endif
742  #ifdef ENOSPC  #ifdef ENOSPC
743          case ENOSPC: return "no space left on device";          case ENOSPC: return "no space left on device";
744  #endif  #endif
745  #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR))  #if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR))
746          case ENOSR: return "out of stream resources";          case ENOSR: return "out of stream resources";
747  #endif  #endif
748  #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR))  #if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR))
749          case ENOSTR: return "not a stream device";          case ENOSTR: return "not a stream device";
750  #endif  #endif
751  #ifdef ENOSYM  #ifdef ENOSYM
752          case ENOSYM: return "unresolved symbol name";          case ENOSYM: return "unresolved symbol name";
753  #endif  #endif
754  #ifdef ENOSYS  #ifdef ENOSYS
755          case ENOSYS: return "function not implemented";          case ENOSYS: return "function not implemented";
756  #endif  #endif
757  #ifdef ENOTBLK  #ifdef ENOTBLK
758          case ENOTBLK: return "block device required";          case ENOTBLK: return "block device required";
759  #endif  #endif
760  #ifdef ENOTCONN  #ifdef ENOTCONN
761          case ENOTCONN: return "socket is not connected";          case ENOTCONN: return "socket is not connected";
762  #endif  #endif
763  #ifdef ENOTDIR  #ifdef ENOTDIR
764          case ENOTDIR: return "not a directory";          case ENOTDIR: return "not a directory";
765  #endif  #endif
766  #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))  #if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))
767          case ENOTEMPTY: return "directory not empty";          case ENOTEMPTY: return "directory not empty";
768  #endif  #endif
769  #ifdef ENOTNAM  #ifdef ENOTNAM
770          case ENOTNAM: return "not a name file";          case ENOTNAM: return "not a name file";
771  #endif  #endif
772  #ifdef ENOTSOCK  #ifdef ENOTSOCK
773          case ENOTSOCK: return "socket operation on non-socket";          case ENOTSOCK: return "socket operation on non-socket";
774  #endif  #endif
775  #ifdef ENOTSUP  #ifdef ENOTSUP
776          case ENOTSUP: return "operation not supported";          case ENOTSUP: return "operation not supported";
777  #endif  #endif
778  #ifdef ENOTTY  #ifdef ENOTTY
779          case ENOTTY: return "inappropriate device for ioctl";          case ENOTTY: return "inappropriate device for ioctl";
780  #endif  #endif
781  #ifdef ENOTUNIQ  #ifdef ENOTUNIQ
782          case ENOTUNIQ: return "name not unique on network";          case ENOTUNIQ: return "name not unique on network";
783  #endif  #endif
784  #ifdef ENXIO  #ifdef ENXIO
785          case ENXIO: return "no such device or address";          case ENXIO: return "no such device or address";
786  #endif  #endif
787  #if defined(EOPNOTSUPP) &&  (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))  #if defined(EOPNOTSUPP) &&  (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
788          case EOPNOTSUPP: return "operation not supported on socket";          case EOPNOTSUPP: return "operation not supported on socket";
789  #endif  #endif
790  #ifdef EPERM  #ifdef EPERM
791          case EPERM: return "not owner";          case EPERM: return "not owner";
792  #endif  #endif
793  #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))  #if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))
794          case EPFNOSUPPORT: return "protocol family not supported";          case EPFNOSUPPORT: return "protocol family not supported";
795  #endif  #endif
796  #ifdef EPIPE  #ifdef EPIPE
797          case EPIPE: return "broken pipe";          case EPIPE: return "broken pipe";
798  #endif  #endif
799  #ifdef EPROCLIM  #ifdef EPROCLIM
800          case EPROCLIM: return "too many processes";          case EPROCLIM: return "too many processes";
801  #endif  #endif
802  #ifdef EPROCUNAVAIL  #ifdef EPROCUNAVAIL
803          case EPROCUNAVAIL: return "bad procedure for program";          case EPROCUNAVAIL: return "bad procedure for program";
804  #endif  #endif
805  #ifdef EPROGMISMATCH  #ifdef EPROGMISMATCH
806          case EPROGMISMATCH: return "program version wrong";          case EPROGMISMATCH: return "program version wrong";
807  #endif  #endif
808  #ifdef EPROGUNAVAIL  #ifdef EPROGUNAVAIL
809          case EPROGUNAVAIL: return "RPC program not available";          case EPROGUNAVAIL: return "RPC program not available";
810  #endif  #endif
811  #ifdef EPROTO  #ifdef EPROTO
812          case EPROTO: return "protocol error";          case EPROTO: return "protocol error";
813  #endif  #endif
814  #ifdef EPROTONOSUPPORT  #ifdef EPROTONOSUPPORT
815          case EPROTONOSUPPORT: return "protocol not suppored";          case EPROTONOSUPPORT: return "protocol not suppored";
816  #endif  #endif
817  #ifdef EPROTOTYPE  #ifdef EPROTOTYPE
818          case EPROTOTYPE: return "protocol wrong type for socket";          case EPROTOTYPE: return "protocol wrong type for socket";
819  #endif  #endif
820  #ifdef ERANGE  #ifdef ERANGE
821          case ERANGE: return "math result unrepresentable";          case ERANGE: return "math result unrepresentable";
822  #endif  #endif
823  #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))  #if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))
824          case EREFUSED: return "EREFUSED";          case EREFUSED: return "EREFUSED";
825  #endif  #endif
826  #ifdef EREMCHG  #ifdef EREMCHG
827          case EREMCHG: return "remote address changed";          case EREMCHG: return "remote address changed";
828  #endif  #endif
829  #ifdef EREMDEV  #ifdef EREMDEV
830          case EREMDEV: return "remote device";          case EREMDEV: return "remote device";
831  #endif  #endif
832  #ifdef EREMOTE  #ifdef EREMOTE
833          case EREMOTE: return "pathname hit remote file system";          case EREMOTE: return "pathname hit remote file system";
834  #endif  #endif
835  #ifdef EREMOTEIO  #ifdef EREMOTEIO
836          case EREMOTEIO: return "remote i/o error";          case EREMOTEIO: return "remote i/o error";
837  #endif  #endif
838  #ifdef EREMOTERELEASE  #ifdef EREMOTERELEASE
839          case EREMOTERELEASE: return "EREMOTERELEASE";          case EREMOTERELEASE: return "EREMOTERELEASE";
840  #endif  #endif
841  #ifdef EROFS  #ifdef EROFS
842          case EROFS: return "read-only file system";          case EROFS: return "read-only file system";
843  #endif  #endif
844  #ifdef ERPCMISMATCH  #ifdef ERPCMISMATCH
845          case ERPCMISMATCH: return "RPC version is wrong";          case ERPCMISMATCH: return "RPC version is wrong";
846  #endif  #endif
847  #ifdef ERREMOTE  #ifdef ERREMOTE
848          case ERREMOTE: return "object is remote";          case ERREMOTE: return "object is remote";
849  #endif  #endif
850  #ifdef ESHUTDOWN  #ifdef ESHUTDOWN
851          case ESHUTDOWN: return "can't send afer socket shutdown";          case ESHUTDOWN: return "can't send afer socket shutdown";
852  #endif  #endif
853  #ifdef ESOCKTNOSUPPORT  #ifdef ESOCKTNOSUPPORT
854          case ESOCKTNOSUPPORT: return "socket type not supported";          case ESOCKTNOSUPPORT: return "socket type not supported";
855  #endif  #endif
856  #ifdef ESPIPE  #ifdef ESPIPE
857          case ESPIPE: return "invalid seek";          case ESPIPE: return "invalid seek";
858  #endif  #endif
859  #ifdef ESRCH  #ifdef ESRCH
860          case ESRCH: return "no such process";          case ESRCH: return "no such process";
861  #endif  #endif
862  #ifdef ESRMNT  #ifdef ESRMNT
863          case ESRMNT: return "srmount error";          case ESRMNT: return "srmount error";
864  #endif  #endif
865  #ifdef ESTALE  #ifdef ESTALE
866          case ESTALE: return "stale remote file handle";          case ESTALE: return "stale remote file handle";
867  #endif  #endif
868  #ifdef ESUCCESS  #ifdef ESUCCESS
869          case ESUCCESS: return "Error 0";          case ESUCCESS: return "Error 0";
870  #endif  #endif
871  #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))  #if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))
872          case ETIME: return "timer expired";          case ETIME: return "timer expired";
873  #endif  #endif
874  #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))  #if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))
875          case ETIMEDOUT: return "connection timed out";          case ETIMEDOUT: return "connection timed out";
876  #endif  #endif
877  #ifdef ETOOMANYREFS  #ifdef ETOOMANYREFS
878          case ETOOMANYREFS: return "too many references: can't splice";          case ETOOMANYREFS: return "too many references: can't splice";
879  #endif  #endif
880  #ifdef ETXTBSY  #ifdef ETXTBSY
881          case ETXTBSY: return "text file or pseudo-device busy";          case ETXTBSY: return "text file or pseudo-device busy";
882  #endif  #endif
883  #ifdef EUCLEAN  #ifdef EUCLEAN
884          case EUCLEAN: return "structure needs cleaning";          case EUCLEAN: return "structure needs cleaning";
885  #endif  #endif
886  #ifdef EUNATCH  #ifdef EUNATCH
887          case EUNATCH: return "protocol driver not attached";          case EUNATCH: return "protocol driver not attached";
888  #endif  #endif
889  #ifdef EUSERS  #ifdef EUSERS
890          case EUSERS: return "too many users";          case EUSERS: return "too many users";
891  #endif  #endif
892  #ifdef EVERSION  #ifdef EVERSION
893          case EVERSION: return "version mismatch";          case EVERSION: return "version mismatch";
894  #endif  #endif
895  #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))  #if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
896          case EWOULDBLOCK: return "operation would block";          case EWOULDBLOCK: return "operation would block";
897  #endif  #endif
898  #ifdef EXDEV  #ifdef EXDEV
899          case EXDEV: return "cross-domain link";          case EXDEV: return "cross-domain link";
900  #endif  #endif
901  #ifdef EXFULL  #ifdef EXFULL
902          case EXFULL: return "message tables full";          case EXFULL: return "message tables full";
903  #endif  #endif
904          default:          default:
905  #ifdef NO_STRERROR  #ifdef NO_STRERROR
906              return "unknown POSIX error";              return "unknown POSIX error";
907  #else  #else
908              return strerror(errno);              return strerror(errno);
909  #endif  #endif
910      }      }
911  }  }
912    
913  /*  /*
914   *----------------------------------------------------------------------   *----------------------------------------------------------------------
915   *   *
916   * Tcl_SignalId --   * Tcl_SignalId --
917   *   *
918   *      Return a textual identifier for a signal number.   *      Return a textual identifier for a signal number.
919   *   *
920   * Results:   * Results:
921   *      This procedure returns a machine-readable textual identifier   *      This procedure returns a machine-readable textual identifier
922   *      that corresponds to sig.  The identifier is the same as the   *      that corresponds to sig.  The identifier is the same as the
923   *      #define name in signal.h.   *      #define name in signal.h.
924   *   *
925   * Side effects:   * Side effects:
926   *      None.   *      None.
927   *   *
928   *----------------------------------------------------------------------   *----------------------------------------------------------------------
929   */   */
930    
931  char *  char *
932  Tcl_SignalId(sig)  Tcl_SignalId(sig)
933      int sig;                    /* Number of signal. */      int sig;                    /* Number of signal. */
934  {  {
935      switch (sig) {      switch (sig) {
936  #ifdef SIGABRT  #ifdef SIGABRT
937          case SIGABRT: return "SIGABRT";          case SIGABRT: return "SIGABRT";
938  #endif  #endif
939  #ifdef SIGALRM  #ifdef SIGALRM
940          case SIGALRM: return "SIGALRM";          case SIGALRM: return "SIGALRM";
941  #endif  #endif
942  #ifdef SIGBUS  #ifdef SIGBUS
943          case SIGBUS: return "SIGBUS";          case SIGBUS: return "SIGBUS";
944  #endif  #endif
945  #ifdef SIGCHLD  #ifdef SIGCHLD
946          case SIGCHLD: return "SIGCHLD";          case SIGCHLD: return "SIGCHLD";
947  #endif  #endif
948  #if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD))  #if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD))
949          case SIGCLD: return "SIGCLD";          case SIGCLD: return "SIGCLD";
950  #endif  #endif
951  #ifdef SIGCONT  #ifdef SIGCONT
952          case SIGCONT: return "SIGCONT";          case SIGCONT: return "SIGCONT";
953  #endif  #endif
954  #if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU))  #if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU))
955          case SIGEMT: return "SIGEMT";          case SIGEMT: return "SIGEMT";
956  #endif  #endif
957  #ifdef SIGFPE  #ifdef SIGFPE
958          case SIGFPE: return "SIGFPE";          case SIGFPE: return "SIGFPE";
959  #endif  #endif
960  #ifdef SIGHUP  #ifdef SIGHUP
961          case SIGHUP: return "SIGHUP";          case SIGHUP: return "SIGHUP";
962  #endif  #endif
963  #ifdef SIGILL  #ifdef SIGILL
964          case SIGILL: return "SIGILL";          case SIGILL: return "SIGILL";
965  #endif  #endif
966  #ifdef SIGINT  #ifdef SIGINT
967          case SIGINT: return "SIGINT";          case SIGINT: return "SIGINT";
968  #endif  #endif
969  #ifdef SIGIO  #ifdef SIGIO
970          case SIGIO: return "SIGIO";          case SIGIO: return "SIGIO";
971  #endif  #endif
972  #if defined(SIGIOT) && (!defined(SIGABRT) || (SIGIOT != SIGABRT))  #if defined(SIGIOT) && (!defined(SIGABRT) || (SIGIOT != SIGABRT))
973          case SIGIOT: return "SIGIOT";          case SIGIOT: return "SIGIOT";
974  #endif  #endif
975  #ifdef SIGKILL  #ifdef SIGKILL
976          case SIGKILL: return "SIGKILL";          case SIGKILL: return "SIGKILL";
977  #endif  #endif
978  #if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO))  #if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO))
979          case SIGLOST: return "SIGLOST";          case SIGLOST: return "SIGLOST";
980  #endif  #endif
981  #ifdef SIGPIPE  #ifdef SIGPIPE
982          case SIGPIPE: return "SIGPIPE";          case SIGPIPE: return "SIGPIPE";
983  #endif  #endif
984  #if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO))  #if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO))
985          case SIGPOLL: return "SIGPOLL";          case SIGPOLL: return "SIGPOLL";
986  #endif  #endif
987  #ifdef SIGPROF  #ifdef SIGPROF
988          case SIGPROF: return "SIGPROF";          case SIGPROF: return "SIGPROF";
989  #endif  #endif
990  #if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ))  #if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ))
991          case SIGPWR: return "SIGPWR";          case SIGPWR: return "SIGPWR";
992  #endif  #endif
993  #ifdef SIGQUIT  #ifdef SIGQUIT
994          case SIGQUIT: return "SIGQUIT";          case SIGQUIT: return "SIGQUIT";
995  #endif  #endif
996  #ifdef SIGSEGV  #ifdef SIGSEGV
997          case SIGSEGV: return "SIGSEGV";          case SIGSEGV: return "SIGSEGV";
998  #endif  #endif
999  #ifdef SIGSTOP  #ifdef SIGSTOP
1000          case SIGSTOP: return "SIGSTOP";          case SIGSTOP: return "SIGSTOP";
1001  #endif  #endif
1002  #ifdef SIGSYS  #ifdef SIGSYS
1003          case SIGSYS: return "SIGSYS";          case SIGSYS: return "SIGSYS";
1004  #endif  #endif
1005  #ifdef SIGTERM  #ifdef SIGTERM
1006          case SIGTERM: return "SIGTERM";          case SIGTERM: return "SIGTERM";
1007  #endif  #endif
1008  #ifdef SIGTRAP  #ifdef SIGTRAP
1009          case SIGTRAP: return "SIGTRAP";          case SIGTRAP: return "SIGTRAP";
1010  #endif  #endif
1011  #ifdef SIGTSTP  #ifdef SIGTSTP
1012          case SIGTSTP: return "SIGTSTP";          case SIGTSTP: return "SIGTSTP";
1013  #endif  #endif
1014  #ifdef SIGTTIN  #ifdef SIGTTIN
1015          case SIGTTIN: return "SIGTTIN";          case SIGTTIN: return "SIGTTIN";
1016  #endif  #endif
1017  #ifdef SIGTTOU  #ifdef SIGTTOU
1018          case SIGTTOU: return "SIGTTOU";          case SIGTTOU: return "SIGTTOU";
1019  #endif  #endif
1020  #if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO))  #if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO))
1021          case SIGURG: return "SIGURG";          case SIGURG: return "SIGURG";
1022  #endif  #endif
1023  #if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO))  #if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO))
1024          case SIGUSR1: return "SIGUSR1";          case SIGUSR1: return "SIGUSR1";
1025  #endif  #endif
1026  #if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG))  #if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG))
1027          case SIGUSR2: return "SIGUSR2";          case SIGUSR2: return "SIGUSR2";
1028  #endif  #endif
1029  #ifdef SIGVTALRM  #ifdef SIGVTALRM
1030          case SIGVTALRM: return "SIGVTALRM";          case SIGVTALRM: return "SIGVTALRM";
1031  #endif  #endif
1032  #ifdef SIGWINCH  #ifdef SIGWINCH
1033          case SIGWINCH: return "SIGWINCH";          case SIGWINCH: return "SIGWINCH";
1034  #endif  #endif
1035  #ifdef SIGXCPU  #ifdef SIGXCPU
1036          case SIGXCPU: return "SIGXCPU";          case SIGXCPU: return "SIGXCPU";
1037  #endif  #endif
1038  #ifdef SIGXFSZ  #ifdef SIGXFSZ
1039          case SIGXFSZ: return "SIGXFSZ";          case SIGXFSZ: return "SIGXFSZ";
1040  #endif  #endif
1041      }      }
1042      return "unknown signal";      return "unknown signal";
1043  }  }
1044    
1045  /*  /*
1046   *----------------------------------------------------------------------   *----------------------------------------------------------------------
1047   *   *
1048   * Tcl_SignalMsg --   * Tcl_SignalMsg --
1049   *   *
1050   *      Return a human-readable message describing a signal.   *      Return a human-readable message describing a signal.
1051   *   *
1052   * Results:   * Results:
1053   *      This procedure returns a string describing sig that should   *      This procedure returns a string describing sig that should
1054   *      make sense to a human.  It may not be easy for a machine   *      make sense to a human.  It may not be easy for a machine
1055   *      to parse.   *      to parse.
1056   *   *
1057   * Side effects:   * Side effects:
1058   *      None.   *      None.
1059   *   *
1060   *----------------------------------------------------------------------   *----------------------------------------------------------------------
1061   */   */
1062    
1063  char *  char *
1064  Tcl_SignalMsg(sig)  Tcl_SignalMsg(sig)
1065      int sig;                    /* Number of signal. */      int sig;                    /* Number of signal. */
1066  {  {
1067      switch (sig) {      switch (sig) {
1068  #ifdef SIGABRT  #ifdef SIGABRT
1069          case SIGABRT: return "SIGABRT";          case SIGABRT: return "SIGABRT";
1070  #endif  #endif
1071  #ifdef SIGALRM  #ifdef SIGALRM
1072          case SIGALRM: return "alarm clock";          case SIGALRM: return "alarm clock";
1073  #endif  #endif
1074  #ifdef SIGBUS  #ifdef SIGBUS
1075          case SIGBUS: return "bus error";          case SIGBUS: return "bus error";
1076  #endif  #endif
1077  #ifdef SIGCHLD  #ifdef SIGCHLD
1078          case SIGCHLD: return "child status changed";          case SIGCHLD: return "child status changed";
1079  #endif  #endif
1080  #if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD))  #if defined(SIGCLD) && (!defined(SIGCHLD) || (SIGCLD != SIGCHLD))
1081          case SIGCLD: return "child status changed";          case SIGCLD: return "child status changed";
1082  #endif  #endif
1083  #ifdef SIGCONT  #ifdef SIGCONT
1084          case SIGCONT: return "continue after stop";          case SIGCONT: return "continue after stop";
1085  #endif  #endif
1086  #if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU))  #if defined(SIGEMT) && (!defined(SIGXCPU) || (SIGEMT != SIGXCPU))
1087          case SIGEMT: return "EMT instruction";          case SIGEMT: return "EMT instruction";
1088  #endif  #endif
1089  #ifdef SIGFPE  #ifdef SIGFPE
1090          case SIGFPE: return "floating-point exception";          case SIGFPE: return "floating-point exception";
1091  #endif  #endif
1092  #ifdef SIGHUP  #ifdef SIGHUP
1093          case SIGHUP: return "hangup";          case SIGHUP: return "hangup";
1094  #endif  #endif
1095  #ifdef SIGILL  #ifdef SIGILL
1096          case SIGILL: return "illegal instruction";          case SIGILL: return "illegal instruction";
1097  #endif  #endif
1098  #ifdef SIGINT  #ifdef SIGINT
1099          case SIGINT: return "interrupt";          case SIGINT: return "interrupt";
1100  #endif  #endif
1101  #ifdef SIGIO  #ifdef SIGIO
1102          case SIGIO: return "input/output possible on file";          case SIGIO: return "input/output possible on file";
1103  #endif  #endif
1104  #if defined(SIGIOT) && (!defined(SIGABRT) || (SIGABRT != SIGIOT))  #if defined(SIGIOT) && (!defined(SIGABRT) || (SIGABRT != SIGIOT))
1105          case SIGIOT: return "IOT instruction";          case SIGIOT: return "IOT instruction";
1106  #endif  #endif
1107  #ifdef SIGKILL  #ifdef SIGKILL
1108          case SIGKILL: return "kill signal";          case SIGKILL: return "kill signal";
1109  #endif  #endif
1110  #if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO))  #if defined(SIGLOST) && (!defined(SIGIOT) || (SIGLOST != SIGIOT)) && (!defined(SIGURG) || (SIGLOST != SIGURG)) && (!defined(SIGPROF) || (SIGLOST != SIGPROF)) && (!defined(SIGIO) || (SIGLOST != SIGIO))
1111          case SIGLOST: return "resource lost";          case SIGLOST: return "resource lost";
1112  #endif  #endif
1113  #ifdef SIGPIPE  #ifdef SIGPIPE
1114          case SIGPIPE: return "write on pipe with no readers";          case SIGPIPE: return "write on pipe with no readers";
1115  #endif  #endif
1116  #if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO))  #if defined(SIGPOLL) && (!defined(SIGIO) || (SIGPOLL != SIGIO))
1117          case SIGPOLL: return "input/output possible on file";          case SIGPOLL: return "input/output possible on file";
1118  #endif  #endif
1119  #ifdef SIGPROF  #ifdef SIGPROF
1120          case SIGPROF: return "profiling alarm";          case SIGPROF: return "profiling alarm";
1121  #endif  #endif
1122  #if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ))  #if defined(SIGPWR) && (!defined(SIGXFSZ) || (SIGPWR != SIGXFSZ))
1123          case SIGPWR: return "power-fail restart";          case SIGPWR: return "power-fail restart";
1124  #endif  #endif
1125  #ifdef SIGQUIT  #ifdef SIGQUIT
1126          case SIGQUIT: return "quit signal";          case SIGQUIT: return "quit signal";
1127  #endif  #endif
1128  #ifdef SIGSEGV  #ifdef SIGSEGV
1129          case SIGSEGV: return "segmentation violation";          case SIGSEGV: return "segmentation violation";
1130  #endif  #endif
1131  #ifdef SIGSTOP  #ifdef SIGSTOP
1132          case SIGSTOP: return "stop";          case SIGSTOP: return "stop";
1133  #endif  #endif
1134  #ifdef SIGSYS  #ifdef SIGSYS
1135          case SIGSYS: return "bad argument to system call";          case SIGSYS: return "bad argument to system call";
1136  #endif  #endif
1137  #ifdef SIGTERM  #ifdef SIGTERM
1138          case SIGTERM: return "software termination signal";          case SIGTERM: return "software termination signal";
1139  #endif  #endif
1140  #ifdef SIGTRAP  #ifdef SIGTRAP
1141          case SIGTRAP: return "trace trap";          case SIGTRAP: return "trace trap";
1142  #endif  #endif
1143  #ifdef SIGTSTP  #ifdef SIGTSTP
1144          case SIGTSTP: return "stop signal from tty";          case SIGTSTP: return "stop signal from tty";
1145  #endif  #endif
1146  #ifdef SIGTTIN  #ifdef SIGTTIN
1147          case SIGTTIN: return "background tty read";          case SIGTTIN: return "background tty read";
1148  #endif  #endif
1149  #ifdef SIGTTOU  #ifdef SIGTTOU
1150          case SIGTTOU: return "background tty write";          case SIGTTOU: return "background tty write";
1151  #endif  #endif
1152  #if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO))  #if defined(SIGURG) && (!defined(SIGIO) || (SIGURG != SIGIO))
1153          case SIGURG: return "urgent I/O condition";          case SIGURG: return "urgent I/O condition";
1154  #endif  #endif
1155  #if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO))  #if defined(SIGUSR1) && (!defined(SIGIO) || (SIGUSR1 != SIGIO))
1156          case SIGUSR1: return "user-defined signal 1";          case SIGUSR1: return "user-defined signal 1";
1157  #endif  #endif
1158  #if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG))  #if defined(SIGUSR2) && (!defined(SIGURG) || (SIGUSR2 != SIGURG))
1159          case SIGUSR2: return "user-defined signal 2";          case SIGUSR2: return "user-defined signal 2";
1160  #endif  #endif
1161  #ifdef SIGVTALRM  #ifdef SIGVTALRM
1162          case SIGVTALRM: return "virtual time alarm";          case SIGVTALRM: return "virtual time alarm";
1163  #endif  #endif
1164  #ifdef SIGWINCH  #ifdef SIGWINCH
1165          case SIGWINCH: return "window changed";          case SIGWINCH: return "window changed";
1166  #endif  #endif
1167  #ifdef SIGXCPU  #ifdef SIGXCPU
1168          case SIGXCPU: return "exceeded CPU time limit";          case SIGXCPU: return "exceeded CPU time limit";
1169  #endif  #endif
1170  #ifdef SIGXFSZ  #ifdef SIGXFSZ
1171          case SIGXFSZ: return "exceeded file size limit";          case SIGXFSZ: return "exceeded file size limit";
1172  #endif  #endif
1173      }      }
1174      return "unknown signal";      return "unknown signal";
1175  }  }
1176    
1177  /* End of tclposixstr.c */  /* End of tclposixstr.c */

Legend:
Removed from v.70  
changed lines
  Added in v.71

dashley@gmail.com
ViewVC Help
Powered by ViewVC 1.1.25