source: trunk/src/emx/include/sys/errno.h@ 1272

Last change on this file since 1272 was 659, checked in by bird, 22 years ago

Changed to doxygen for header status.

  • Property cvs2svn:cvs-rev set to 1.9
  • Property svn:eol-style set to native
  • Property svn:executable set to *
File size: 8.4 KB
Line 
1/*
2 * Copyright (c) 1982, 1986, 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
12 * are met:
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
18 * 3. All advertising materials mentioning features or use of this software
19 * must display the following acknowledgement:
20 * This product includes software developed by the University of
21 * California, Berkeley and its contributors.
22 * 4. Neither the name of the University nor the names of its contributors
23 * may be used to endorse or promote products derived from this software
24 * without specific prior written permission.
25 *
26 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
27 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 * SUCH DAMAGE.
37 *
38 * @(#)errno.h 8.5 (Berkeley) 1/21/94
39 * $FreeBSD: src/sys/sys/errno.h,v 1.25 2002/10/07 06:25:23 phk Exp $
40 */
41
42/** @file
43 * FreeBSD 5.1
44 * @changed bird: errno wrapper and added comments about defines which have moved.
45 */
46
47#ifndef _SYS_ERRNO_H_
48#define _SYS_ERRNO_H_
49#define _SYS_ERRNO_H /* bird: emx */
50
51#ifndef _KERNEL
52#if !defined (_ERRNO) && !defined (__ASSEMBLER__) /* bird: emx */
53#include <sys/cdefs.h>
54__BEGIN_DECLS
55#define _ERRNO /* bird: emx */
56extern int * _errno(void); /* bird: emx is using _errno, bsd __error. */
57__END_DECLS
58#define errno (* _errno()) /* bird: emx */
59#endif /* bird: emx */
60#endif
61
62#define EPERM 1 /* Operation not permitted */
63#define ENOENT 2 /* No such file or directory */
64#define ESRCH 3 /* No such process */
65#define EINTR 4 /* Interrupted system call */
66#define EIO 5 /* Input/output error */
67#define ENXIO 6 /* Device not configured */
68#define E2BIG 7 /* Argument list too long */
69#define ENOEXEC 8 /* Exec format error */
70#define EBADF 9 /* Bad file descriptor */
71#define ECHILD 10 /* No child processes */
72/* bird: old emx #define EAGAIN 11 */
73#define EDEADLK 11 /* Resource deadlock avoided */
74 /* 11 was EAGAIN */
75#define ENOMEM 12 /* Cannot allocate memory */
76#define EACCES 13 /* Permission denied */
77#define EFAULT 14 /* Bad address */
78/* bird: old emx #define ENOLCK 15 */
79#ifndef _POSIX_SOURCE
80#define ENOTBLK 15 /* Block device required */
81#endif
82#define EBUSY 16 /* Device busy */
83#define EEXIST 17 /* File exists */
84#define EXDEV 18 /* Cross-device link */
85#define ENODEV 19 /* Operation not supported by device */
86#define ENOTDIR 20 /* Not a directory */
87#define EISDIR 21 /* Is a directory */
88#define EINVAL 22 /* Invalid argument */
89#define ENFILE 23 /* Too many open files in system */
90#define EMFILE 24 /* Too many open files */
91#define ENOTTY 25 /* Inappropriate ioctl for device */
92/* bird: old emx #define EDEADLK 26 */
93#ifndef _POSIX_SOURCE
94#define ETXTBSY 26 /* Text file busy */
95#endif
96#define EFBIG 27 /* File too large */
97#define ENOSPC 28 /* No space left on device */
98#define ESPIPE 29 /* Illegal seek */
99#define EROFS 30 /* Read-only filesystem */
100#define EMLINK 31 /* Too many links */
101#define EPIPE 32 /* Broken pipe */
102
103/* math software */
104#define EDOM 33 /* Numerical argument out of domain */
105#define ERANGE 34 /* Result too large */
106
107/* non-blocking and interrupt i/o */
108/* bird: old emx #define ENOTEMPTY 35 */
109#define EAGAIN 35 /* Resource temporarily unavailable */
110#ifndef _POSIX_SOURCE
111#define EWOULDBLOCK EAGAIN /* Operation would block */
112#define EINPROGRESS 36 /* Operation now in progress */
113/* bird: old emx#define ENOSYS 37 */
114#define EALREADY 37 /* Operation already in progress */
115
116/* ipc/network software -- argument errors */
117/* bird: old emx #define ENAMETOOLONG 38 */
118#define ENOTSOCK 38 /* Socket operation on non-socket */
119#define EDESTADDRREQ 39 /* Destination address required */
120#define EMSGSIZE 40 /* Message too long */
121#define EPROTOTYPE 41 /* Protocol wrong type for socket */
122#define ENOPROTOOPT 42 /* Protocol not available */
123#define EPROTONOSUPPORT 43 /* Protocol not supported */
124#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
125#define EOPNOTSUPP 45 /* Operation not supported */
126#define ENOTSUP EOPNOTSUPP /* Operation not supported */
127#define EPFNOSUPPORT 46 /* Protocol family not supported */
128#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
129#define EADDRINUSE 48 /* Address already in use */
130#define EADDRNOTAVAIL 49 /* Can't assign requested address */
131
132/* ipc/network software -- operational errors */
133#define ENETDOWN 50 /* Network is down */
134#define ENETUNREACH 51 /* Network is unreachable */
135#define ENETRESET 52 /* Network dropped connection on reset */
136#define ECONNABORTED 53 /* Software caused connection abort */
137#define ECONNRESET 54 /* Connection reset by peer */
138#define ENOBUFS 55 /* No buffer space available */
139#define EISCONN 56 /* Socket is already connected */
140#define ENOTCONN 57 /* Socket is not connected */
141#define ESHUTDOWN 58 /* Can't send after socket shutdown */
142#define ETOOMANYREFS 59 /* Too many references: can't splice */
143#define ETIMEDOUT 60 /* Operation timed out */
144#define ECONNREFUSED 61 /* Connection refused */
145
146#define ELOOP 62 /* Too many levels of symbolic links */
147#endif /* _POSIX_SOURCE */
148/* bird: old emx #define ENOTSOCK 63 */
149#define ENAMETOOLONG 63 /* File name too long */
150
151/* should be rearranged */
152#ifndef _POSIX_SOURCE
153#define EHOSTDOWN 64 /* Host is down */
154#define EHOSTUNREACH 65 /* No route to host */
155#endif /* _POSIX_SOURCE */
156/* bird: old emx #define EALREADY 66 */
157#define ENOTEMPTY 66 /* Directory not empty */
158
159/* quotas & mush */
160#ifndef _POSIX_SOURCE
161#define EPROCLIM 67 /* Too many processes */
162#define EUSERS 68 /* Too many users */
163#define EDQUOT 69 /* Disc quota exceeded */
164
165/* Network File System */
166#define ESTALE 70 /* Stale NFS file handle */
167#define EREMOTE 71 /* Too many levels of remote in path */
168#define EBADRPC 72 /* RPC struct is bad */
169#define ERPCMISMATCH 73 /* RPC version wrong */
170#define EPROGUNAVAIL 74 /* RPC prog. not avail */
171#define EPROGMISMATCH 75 /* Program version wrong */
172#define EPROCUNAVAIL 76 /* Bad procedure for program */
173#endif /* _POSIX_SOURCE */
174
175#define ENOLCK 77 /* No locks available */
176#define ENOSYS 78 /* Function not implemented */
177
178#ifndef _POSIX_SOURCE
179#define EFTYPE 79 /* Inappropriate file type or format */
180#define EAUTH 80 /* Authentication error */
181#define ENEEDAUTH 81 /* Need authenticator */
182#define EIDRM 82 /* Identifier removed */
183#define ENOMSG 83 /* No message of desired type */
184#define EOVERFLOW 84 /* Value too large to be stored in data type */
185#define ECANCELED 85 /* Operation canceled */
186#define EILSEQ 86 /* Illegal byte sequence */
187#define ENOATTR 87 /* Attribute not found */
188
189#define EDOOFUS 88 /* Programming error */
190
191#define ELAST 88 /* Must be equal largest errno */
192
193#endif /* _POSIX_SOURCE */
194
195#ifdef _KERNEL
196/* pseudo-errors returned inside kernel to modify return to process */
197#define ERESTART (-1) /* restart syscall */
198#define EJUSTRETURN (-2) /* don't modify regs, just return */
199#define ENOIOCTL (-3) /* ioctl not handled by this layer */
200#define EDIRIOCTL (-4) /* do direct ioctl in GEOM */
201#endif
202
203#endif
Note: See TracBrowser for help on using the repository browser.