2 # This file is auto-generated. ***ANY*** changes here will be lost
6 use vars
qw(@EXPORT_OK %EXPORT_TAGS @ISA $VERSION %errno $AUTOLOAD);
11 "$Config{'archname'}-$Config{'osvers'}" eq
12 "msys-1.0.8(0.4632)" or
13 die "Errno architecture (msys-1.0.8(0.4632)) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
18 @EXPORT_OK = qw(EPIPE ENOLINK ECOMM ENOTSOCK EIDRM EBADMSG EWOULDBLOCK
19 ENOSPC EISCONN EREMCHG ENOTTY EOPNOTSUPP ENODATA EAFNOSUPPORT
20 ESHUTDOWN ENETUNREACH EAGAIN EADDRNOTAVAIL ESOCKTNOSUPPORT EPROCLIM
21 ENOTDIR ECHRNG EL2HLT ESRCH EINPROGRESS EISDIR EDQUOT EROFS ENMFILE
22 ELNRNG EEXIST EBADE EBADF ECASECLASH ENOPROTOOPT EXFULL EINVAL ENOSTR
23 ENOLCK ENOMSG EL3RST ENOMEDIUM EBADR ESRMNT ENAMETOOLONG EBFONT
24 EMSGSIZE ENOTBLK EDESTADDRREQ EINTR EPROTONOSUPPORT ETIME EBADRQC
25 ELOOP ECONNREFUSED EIO EPROTOTYPE ENONET EDEADLK ECONNRESET ENETDOWN
26 ESTALE EFBIG ENOEXEC ENOPKG ENOTCONN ENFILE ENOSR EACCES ETIMEDOUT
27 EPERM ERANGE ENOCSI EREMOTE ESPIPE EDEADLOCK ENOMEM ENOSYS EXDEV
28 ELIBMAX ECHILD EMULTIHOP EPFNOSUPPORT EL2NSYNC EL3HLT ENODEV ELBIN
29 ELIBACC EALREADY ENOANO ELIBSCN EADV EMLINK ENOSHARE EDOTDOT EUNATCH
30 ENXIO ETOOMANYREFS EUSERS EPROTO EADDRINUSE E2BIG EBUSY ECONNABORTED
31 ENOENT ENETRESET ENOTEMPTY EBADFD EDOM ENOTSUP ELIBEXEC EHOSTUNREACH
32 ENOBUFS EBADSLT EFAULT ETXTBSY EHOSTDOWN ELIBBAD ENOTUNIQ EMFILE);
36 E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
37 EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
38 EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
39 EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
40 EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
41 ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
42 ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
43 EPFNOSUPPORT EPIPE EPROCLIM EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE
44 EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
45 ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
59 sub EWOULDBLOCK
() { 11 }
87 sub EL2NSYNC
() { 38 }
100 sub EBADRQC
() { 54 }
101 sub EBADSLT
() { 55 }
102 sub EDEADLOCK
() { 56 }
105 sub ENODATA
() { 61 }
110 sub EREMOTE
() { 66 }
111 sub ENOLINK
() { 67 }
116 sub EMULTIHOP
() { 74 }
118 sub EDOTDOT
() { 76 }
119 sub EBADMSG
() { 77 }
120 sub ENOTUNIQ
() { 80 }
122 sub EREMCHG
() { 82 }
123 sub ELIBACC
() { 83 }
124 sub ELIBBAD
() { 84 }
125 sub ELIBSCN
() { 85 }
126 sub ELIBMAX
() { 86 }
127 sub ELIBEXEC
() { 87 }
129 sub ENMFILE
() { 89 }
130 sub ENOTEMPTY
() { 90 }
131 sub ENAMETOOLONG
() { 91 }
133 sub EOPNOTSUPP
() { 95 }
134 sub EPFNOSUPPORT
() { 96 }
135 sub ECONNRESET
() { 104 }
136 sub ENOBUFS
() { 105 }
137 sub EAFNOSUPPORT
() { 106 }
138 sub EPROTOTYPE
() { 107 }
139 sub ENOTSOCK
() { 108 }
140 sub ENOPROTOOPT
() { 109 }
141 sub ESHUTDOWN
() { 110 }
142 sub ECONNREFUSED
() { 111 }
143 sub EADDRINUSE
() { 112 }
144 sub ECONNABORTED
() { 113 }
145 sub ENETUNREACH
() { 114 }
146 sub ENETDOWN
() { 115 }
147 sub ETIMEDOUT
() { 116 }
148 sub EHOSTDOWN
() { 117 }
149 sub EHOSTUNREACH
() { 118 }
150 sub EINPROGRESS
() { 119 }
151 sub EALREADY
() { 120 }
152 sub EDESTADDRREQ
() { 121 }
153 sub EMSGSIZE
() { 122 }
154 sub EPROTONOSUPPORT
() { 123 }
155 sub ESOCKTNOSUPPORT
() { 124 }
156 sub EADDRNOTAVAIL
() { 125 }
157 sub ENETRESET
() { 126 }
158 sub EISCONN
() { 127 }
159 sub ENOTCONN
() { 128 }
160 sub ETOOMANYREFS
() { 129 }
161 sub EPROCLIM
() { 130 }
162 sub EUSERS
() { 131 }
163 sub EDQUOT
() { 132 }
164 sub ESTALE
() { 133 }
165 sub ENOTSUP
() { 134 }
166 sub ENOMEDIUM
() { 135 }
167 sub ENOSHARE
() { 136 }
168 sub ECASECLASH
() { 137 }
170 sub TIEHASH
{ bless [] }
173 my ($self, $errname) = @_;
174 my $proto = prototype("Errno::$errname");
176 if (defined($proto) && $proto eq "") {
179 $errno = 0 unless $! == $errno;
186 Carp
::confess
("ERRNO hash is read only!");
194 while(($k,$v) = each %Errno::) {
195 my $proto = prototype("Errno::$k");
196 last if (defined($proto) && $proto eq "");
202 my $s = scalar keys %Errno::; # initialize iterator
207 my ($self, $errname) = @_;
208 my $proto = prototype($errname);
209 defined($proto) && $proto eq "";
219 Errno - System errno constants
223 use Errno qw(EINTR EIO :POSIX);
227 C<Errno> defines and conditionally exports all the error constants
228 defined in your system C<errno.h> include file. It has a single export
229 tag, C<:POSIX>, which will export all POSIX defined error numbers.
231 C<Errno> also makes C<%!> magic such that each element of C<%!> has a
232 non-zero value only if C<$!> is set to that value. For example:
236 unless (open(FH, "/fangorn/spouse")) {
238 warn "Get a wife!\n";
240 warn "This path is barred: $!";
244 If a specified constant C<EFOO> does not exist on the system, C<$!{EFOO}>
245 returns C<"">. You may use C<exists $!{EFOO}> to check whether the
246 constant is available on the system.
250 Importing a particular constant may not be very portable, because the
251 import will fail on platforms that do not have that constant. A more
252 portable way to set C<$!> to a valid value is to use:
254 if (exists &Errno::EFOO) {
260 Graham Barr <gbarr@pobox.com>
264 Copyright (c) 1997-8 Graham Barr. All rights reserved.
265 This program is free software; you can redistribute it and/or modify it
266 under the same terms as Perl itself.