Initial commit of OpenSPARC T2 design and verification files.
[OpenSPARC-T2-DV] / tools / perl-5.8.0 / lib / 5.8.0 / sun4-solaris / Errno.pm
CommitLineData
86530b38
AT
1#
2# This file is auto-generated. ***ANY*** changes here will be lost
3#
4
5package Errno;
6our (@EXPORT_OK,%EXPORT_TAGS,@ISA,$VERSION,%errno,$AUTOLOAD);
7use Exporter ();
8use Config;
9use strict;
10
11"$Config{'archname'}-$Config{'osvers'}" eq
12"sun4-solaris-2.8" or
13 die "Errno architecture (sun4-solaris-2.8) does not match executable architecture ($Config{'archname'}-$Config{'osvers'})";
14
15$VERSION = "1.09_00";
16$VERSION = eval $VERSION;
17@ISA = qw(Exporter);
18
19@EXPORT_OK = qw(ENOMSG EBADR EADV EROFS ENOTSUP ESHUTDOWN EMULTIHOP
20 EPROTONOSUPPORT ENFILE ENOLCK ESTRPIPE EL3HLT EADDRINUSE ECONNABORTED
21 EBADF ECANCELED ENOTBLK ECHRNG EDEADLK ENOLINK ESRMNT ELNRNG ENOTDIR
22 ETIME EINVAL ENOTTY ENOANO EXDEV EBADE EBADSLT ELOOP ECONNREFUSED
23 ENOSTR ENONET ENOTACTIVE EOVERFLOW EISCONN EFBIG ENOENT EPFNOSUPPORT
24 ECONNRESET ELIBMAX EWOULDBLOCK EBADMSG EL2HLT ENOPKG EDOM EBFONT
25 ELIBSCN EMSGSIZE ENOCSI EL3RST ENOSPC EIO EIDRM ENOTSOCK EDESTADDRREQ
26 ERANGE ENOBUFS EINPROGRESS ENOSYS EAFNOSUPPORT EADDRNOTAVAIL EINTR
27 EHOSTDOWN EREMOTE EILSEQ EBADFD ENOSR ENOMEM EPIPE ENETUNREACH
28 ENOTCONN ENODATA ESTALE EDQUOT EUSERS EOPNOTSUPP EPROTO ESPIPE
29 EALREADY ENOTRECOVERABLE EMFILE ENAMETOOLONG EACCES ELOCKUNMAPPED
30 ENOEXEC EISDIR EBUSY EBADRQC E2BIG EPERM EEXIST ELIBEXEC ETOOMANYREFS
31 ELIBACC ENOTUNIQ ECOMM ELIBBAD EOWNERDEAD ERESTART EUNATCH
32 ESOCKTNOSUPPORT ETIMEDOUT ENXIO ESRCH EFAULT ENODEV ETXTBSY EDEADLOCK
33 EXFULL EAGAIN EMLINK ENOPROTOOPT ECHILD ENETDOWN EHOSTUNREACH
34 EPROTOTYPE EL2NSYNC EREMCHG ENETRESET ENOTEMPTY);
35
36%EXPORT_TAGS = (
37 POSIX => [qw(
38 E2BIG EACCES EADDRINUSE EADDRNOTAVAIL EAFNOSUPPORT EAGAIN EALREADY
39 EBADF EBUSY ECHILD ECONNABORTED ECONNREFUSED ECONNRESET EDEADLK
40 EDESTADDRREQ EDOM EDQUOT EEXIST EFAULT EFBIG EHOSTDOWN EHOSTUNREACH
41 EINPROGRESS EINTR EINVAL EIO EISCONN EISDIR ELOOP EMFILE EMLINK
42 EMSGSIZE ENAMETOOLONG ENETDOWN ENETRESET ENETUNREACH ENFILE ENOBUFS
43 ENODEV ENOENT ENOEXEC ENOLCK ENOMEM ENOPROTOOPT ENOSPC ENOSYS ENOTBLK
44 ENOTCONN ENOTDIR ENOTEMPTY ENOTSOCK ENOTTY ENXIO EOPNOTSUPP EPERM
45 EPFNOSUPPORT EPIPE EPROTONOSUPPORT EPROTOTYPE ERANGE EREMOTE ERESTART
46 EROFS ESHUTDOWN ESOCKTNOSUPPORT ESPIPE ESRCH ESTALE ETIMEDOUT
47 ETOOMANYREFS ETXTBSY EUSERS EWOULDBLOCK EXDEV
48 )]
49);
50
51sub EPERM () { 1 }
52sub ENOENT () { 2 }
53sub ESRCH () { 3 }
54sub EINTR () { 4 }
55sub EIO () { 5 }
56sub ENXIO () { 6 }
57sub E2BIG () { 7 }
58sub ENOEXEC () { 8 }
59sub EBADF () { 9 }
60sub ECHILD () { 10 }
61sub EWOULDBLOCK () { 11 }
62sub EAGAIN () { 11 }
63sub ENOMEM () { 12 }
64sub EACCES () { 13 }
65sub EFAULT () { 14 }
66sub ENOTBLK () { 15 }
67sub EBUSY () { 16 }
68sub EEXIST () { 17 }
69sub EXDEV () { 18 }
70sub ENODEV () { 19 }
71sub ENOTDIR () { 20 }
72sub EISDIR () { 21 }
73sub EINVAL () { 22 }
74sub ENFILE () { 23 }
75sub EMFILE () { 24 }
76sub ENOTTY () { 25 }
77sub ETXTBSY () { 26 }
78sub EFBIG () { 27 }
79sub ENOSPC () { 28 }
80sub ESPIPE () { 29 }
81sub EROFS () { 30 }
82sub EMLINK () { 31 }
83sub EPIPE () { 32 }
84sub EDOM () { 33 }
85sub ERANGE () { 34 }
86sub ENOMSG () { 35 }
87sub EIDRM () { 36 }
88sub ECHRNG () { 37 }
89sub EL2NSYNC () { 38 }
90sub EL3HLT () { 39 }
91sub EL3RST () { 40 }
92sub ELNRNG () { 41 }
93sub EUNATCH () { 42 }
94sub ENOCSI () { 43 }
95sub EL2HLT () { 44 }
96sub EDEADLK () { 45 }
97sub ENOLCK () { 46 }
98sub ECANCELED () { 47 }
99sub ENOTSUP () { 48 }
100sub EDQUOT () { 49 }
101sub EBADE () { 50 }
102sub EBADR () { 51 }
103sub EXFULL () { 52 }
104sub ENOANO () { 53 }
105sub EBADRQC () { 54 }
106sub EBADSLT () { 55 }
107sub EDEADLOCK () { 56 }
108sub EBFONT () { 57 }
109sub EOWNERDEAD () { 58 }
110sub ENOTRECOVERABLE () { 59 }
111sub ENOSTR () { 60 }
112sub ENODATA () { 61 }
113sub ETIME () { 62 }
114sub ENOSR () { 63 }
115sub ENONET () { 64 }
116sub ENOPKG () { 65 }
117sub EREMOTE () { 66 }
118sub ENOLINK () { 67 }
119sub EADV () { 68 }
120sub ESRMNT () { 69 }
121sub ECOMM () { 70 }
122sub EPROTO () { 71 }
123sub ELOCKUNMAPPED () { 72 }
124sub ENOTACTIVE () { 73 }
125sub EMULTIHOP () { 74 }
126sub EBADMSG () { 77 }
127sub ENAMETOOLONG () { 78 }
128sub EOVERFLOW () { 79 }
129sub ENOTUNIQ () { 80 }
130sub EBADFD () { 81 }
131sub EREMCHG () { 82 }
132sub ELIBACC () { 83 }
133sub ELIBBAD () { 84 }
134sub ELIBSCN () { 85 }
135sub ELIBMAX () { 86 }
136sub ELIBEXEC () { 87 }
137sub EILSEQ () { 88 }
138sub ENOSYS () { 89 }
139sub ELOOP () { 90 }
140sub ERESTART () { 91 }
141sub ESTRPIPE () { 92 }
142sub ENOTEMPTY () { 93 }
143sub EUSERS () { 94 }
144sub ENOTSOCK () { 95 }
145sub EDESTADDRREQ () { 96 }
146sub EMSGSIZE () { 97 }
147sub EPROTOTYPE () { 98 }
148sub ENOPROTOOPT () { 99 }
149sub EPROTONOSUPPORT () { 120 }
150sub ESOCKTNOSUPPORT () { 121 }
151sub EOPNOTSUPP () { 122 }
152sub EPFNOSUPPORT () { 123 }
153sub EAFNOSUPPORT () { 124 }
154sub EADDRINUSE () { 125 }
155sub EADDRNOTAVAIL () { 126 }
156sub ENETDOWN () { 127 }
157sub ENETUNREACH () { 128 }
158sub ENETRESET () { 129 }
159sub ECONNABORTED () { 130 }
160sub ECONNRESET () { 131 }
161sub ENOBUFS () { 132 }
162sub EISCONN () { 133 }
163sub ENOTCONN () { 134 }
164sub ESHUTDOWN () { 143 }
165sub ETOOMANYREFS () { 144 }
166sub ETIMEDOUT () { 145 }
167sub ECONNREFUSED () { 146 }
168sub EHOSTDOWN () { 147 }
169sub EHOSTUNREACH () { 148 }
170sub EALREADY () { 149 }
171sub EINPROGRESS () { 150 }
172sub ESTALE () { 151 }
173
174sub TIEHASH { bless [] }
175
176sub FETCH {
177 my ($self, $errname) = @_;
178 my $proto = prototype("Errno::$errname");
179 my $errno = "";
180 if (defined($proto) && $proto eq "") {
181 no strict 'refs';
182 $errno = &$errname;
183 $errno = 0 unless $! == $errno;
184 }
185 return $errno;
186}
187
188sub STORE {
189 require Carp;
190 Carp::confess("ERRNO hash is read only!");
191}
192
193*CLEAR = \&STORE;
194*DELETE = \&STORE;
195
196sub NEXTKEY {
197 my($k,$v);
198 while(($k,$v) = each %Errno::) {
199 my $proto = prototype("Errno::$k");
200 last if (defined($proto) && $proto eq "");
201 }
202 $k
203}
204
205sub FIRSTKEY {
206 my $s = scalar keys %Errno::; # initialize iterator
207 goto &NEXTKEY;
208}
209
210sub EXISTS {
211 my ($self, $errname) = @_;
212 my $proto = prototype($errname);
213 defined($proto) && $proto eq "";
214}
215
216tie %!, __PACKAGE__;
217
2181;
219__END__
220
221=head1 NAME
222
223Errno - System errno constants
224
225=head1 SYNOPSIS
226
227 use Errno qw(EINTR EIO :POSIX);
228
229=head1 DESCRIPTION
230
231C<Errno> defines and conditionally exports all the error constants
232defined in your system C<errno.h> include file. It has a single export
233tag, C<:POSIX>, which will export all POSIX defined error numbers.
234
235C<Errno> also makes C<%!> magic such that each element of C<%!> has a
236non-zero value only if C<$!> is set to that value. For example:
237
238 use Errno;
239
240 unless (open(FH, "/fangorn/spouse")) {
241 if ($!{ENOENT}) {
242 warn "Get a wife!\n";
243 } else {
244 warn "This path is barred: $!";
245 }
246 }
247
248If a specified constant C<EFOO> does not exist on the system, C<$!{EFOO}>
249returns C<"">. You may use C<exists $!{EFOO}> to check whether the
250constant is available on the system.
251
252=head1 CAVEATS
253
254Importing a particular constant may not be very portable, because the
255import will fail on platforms that do not have that constant. A more
256portable way to set C<$!> to a valid value is to use:
257
258 if (exists &Errno::EFOO) {
259 $! = &Errno::EFOO;
260 }
261
262=head1 AUTHOR
263
264Graham Barr <gbarr@pobox.com>
265
266=head1 COPYRIGHT
267
268Copyright (c) 1997-8 Graham Barr. All rights reserved.
269This program is free software; you can redistribute it and/or modify it
270under the same terms as Perl itself.
271
272=cut
273