source: branches/libc-0.6/src/emx/include/sys/errno.h

Last change on this file was 2289, checked in by bird, 20 years ago

o Protect the fork operations by the means of must complete so

signals won't interrupt us till we're finished. This might leave
unkillable processes around if fork goes highwire.

o Better exception logging during fork.
o Use MMX memcpy in fork (if supported).
o The C function libc_Back_processFork() replaces the pure assembly fork().

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