source: trunk/libs/newlib/src/newlib/libc/machine/cris/sys/errno.h @ 444

Last change on this file since 444 was 444, checked in by satin@…, 6 years ago

add newlib,libalmos-mkh, restructure shared_syscalls.h and mini-libc

File size: 7.4 KB
Line 
1/* This file is to be kept in sync with newlib/libc/include/sys/errno.h
2   on which it is based, except values used or returned by syscalls must
3   be those of the Linux/CRIS kernel.  */
4
5/* errno is not a global variable, because that would make using it
6   non-reentrant.  Instead, its address is returned by the function
7   __errno.  */
8
9#ifndef _SYS_ERRNO_H_
10#ifdef __cplusplus
11extern "C" {
12#endif
13#define _SYS_ERRNO_H_
14
15#include <sys/reent.h>
16
17#ifndef _REENT_ONLY
18#define errno (*__errno())
19extern int *__errno (void);
20#endif
21
22/* Please don't use these variables directly.
23   Use strerror instead. */
24extern const char * const _sys_errlist[];
25extern int _sys_nerr;
26
27#define __errno_r(ptr) ((ptr)->_errno)
28
29/* Adjusted to the linux asm/errno.h */
30#define EPERM            1      /* Operation not permitted */
31#define ENOENT           2      /* No such file or directory */
32#define ESRCH            3      /* No such process */
33#define EINTR            4      /* Interrupted system call */
34#define EIO              5      /* I/O error */
35#define ENXIO            6      /* No such device or address */
36#define E2BIG            7      /* Arg list too long */
37#define ENOEXEC          8      /* Exec format error */
38#define EBADF            9      /* Bad file number */
39#define ECHILD          10      /* No child processes */
40#define EAGAIN          11      /* Try again */
41#define ENOMEM          12      /* Out of memory */
42#define EACCES          13      /* Permission denied */
43#define EFAULT          14      /* Bad address */
44#define ENOTBLK         15      /* Block device required */
45#define EBUSY           16      /* Device or resource busy */
46#define EEXIST          17      /* File exists */
47#define EXDEV           18      /* Cross-device link */
48#define ENODEV          19      /* No such device */
49#define ENOTDIR         20      /* Not a directory */
50#define EISDIR          21      /* Is a directory */
51#define EINVAL          22      /* Invalid argument */
52#define ENFILE          23      /* File table overflow */
53#define EMFILE          24      /* Too many open files */
54#define ENOTTY          25      /* Not a typewriter */
55#define ETXTBSY         26      /* Text file busy */
56#define EFBIG           27      /* File too large */
57#define ENOSPC          28      /* No space left on device */
58#define ESPIPE          29      /* Illegal seek */
59#define EROFS           30      /* Read-only file system */
60#define EMLINK          31      /* Too many links */
61#define EPIPE           32      /* Broken pipe */
62#define EDOM            33      /* Math argument out of domain of func */
63#define ERANGE          34      /* Math result not representable */
64#define EDEADLK         35      /* Resource deadlock would occur */
65#define ENAMETOOLONG    36      /* File name too long */
66#define ENOLCK          37      /* No record locks available */
67#define ENOSYS          38      /* Function not implemented */
68#define ENOTEMPTY       39      /* Directory not empty */
69#define ELOOP           40      /* Too many symbolic links encountered */
70#define EWOULDBLOCK     EAGAIN  /* Operation would block */
71#define ENOMSG          42      /* No message of desired type */
72#define EIDRM           43      /* Identifier removed */
73#define ECHRNG          44      /* Channel number out of range */
74#define EL2NSYNC        45      /* Level 2 not synchronized */
75#define EL3HLT          46      /* Level 3 halted */
76#define EL3RST          47      /* Level 3 reset */
77#define ELNRNG          48      /* Link number out of range */
78#define EUNATCH         49      /* Protocol driver not attached */
79#define ENOCSI          50      /* No CSI structure available */
80#define EL2HLT          51      /* Level 2 halted */
81#define EBADE           52      /* Invalid exchange */
82#define EBADR           53      /* Invalid request descriptor */
83#define EXFULL          54      /* Exchange full */
84#define ENOANO          55      /* No anode */
85#define EBADRQC         56      /* Invalid request code */
86#define EBADSLT         57      /* Invalid slot */
87
88#define EDEADLOCK       EDEADLK
89
90#define EBFONT          59      /* Bad font file format */
91/* This is only used internally in newlib; not returned by the kernel.
92   EBFONT seems the closest match for a "bad file format" error.  */
93#define EFTYPE          EBFONT  /* Inappropriate file type or format */
94#define ENOSTR          60      /* Device not a stream */
95#define ENODATA         61      /* No data available */
96#define ETIME           62      /* Timer expired */
97#define ENOSR           63      /* Out of streams resources */
98#define ENONET          64      /* Machine is not on the network */
99#define ENOPKG          65      /* Package not installed */
100#define EREMOTE         66      /* Object is remote */
101#define ENOLINK         67      /* Link has been severed */
102#define EADV            68      /* Advertise error */
103#define ESRMNT          69      /* Srmount error */
104#define ECOMM           70      /* Communication error on send */
105#define EPROTO          71      /* Protocol error */
106#define EMULTIHOP       72      /* Multihop attempted */
107#define EDOTDOT         73      /* RFS specific error */
108#define EBADMSG         74      /* Not a data message */
109#define EOVERFLOW       75      /* Value too large for defined data type */
110#define ENOTUNIQ        76      /* Name not unique on network */
111#define EBADFD          77      /* File descriptor in bad state */
112#define EREMCHG         78      /* Remote address changed */
113#define ELIBACC         79      /* Can not access a needed shared library */
114#define ELIBBAD         80      /* Accessing a corrupted shared library */
115#define ELIBSCN         81      /* .lib section in a.out corrupted */
116#define ELIBMAX         82      /* Attempting to link in too many shared libraries */
117#define ELIBEXEC        83      /* Cannot exec a shared library directly */
118#define EILSEQ          84      /* Illegal byte sequence */
119#define ERESTART        85      /* Interrupted system call should be restarted */
120#define ESTRPIPE        86      /* Streams pipe error */
121#define EUSERS          87      /* Too many users */
122#define ENOTSOCK        88      /* Socket operation on non-socket */
123#define EDESTADDRREQ    89      /* Destination address required */
124#define EMSGSIZE        90      /* Message too long */
125#define EPROTOTYPE      91      /* Protocol wrong type for socket */
126#define ENOPROTOOPT     92      /* Protocol not available */
127#define EPROTONOSUPPORT 93      /* Protocol not supported */
128#define ESOCKTNOSUPPORT 94      /* Socket type not supported */
129#define EOPNOTSUPP      95      /* Operation not supported on transport endpoint */
130#define EPFNOSUPPORT    96      /* Protocol family not supported */
131#define EAFNOSUPPORT    97      /* Address family not supported by protocol */
132#define EADDRINUSE      98      /* Address already in use */
133#define EADDRNOTAVAIL   99      /* Cannot assign requested address */
134#define ENETDOWN        100     /* Network is down */
135#define ENETUNREACH     101     /* Network is unreachable */
136#define ENETRESET       102     /* Network dropped connection because of reset */
137#define ECONNABORTED    103     /* Software caused connection abort */
138#define ECONNRESET      104     /* Connection reset by peer */
139#define ENOBUFS         105     /* No buffer space available */
140#define EISCONN         106     /* Transport endpoint is already connected */
141#define ENOTCONN        107     /* Transport endpoint is not connected */
142#define ESHUTDOWN       108     /* Cannot send after transport endpoint shutdown */
143#define ETOOMANYREFS    109     /* Too many references: cannot splice */
144#define ETIMEDOUT       110     /* Connection timed out */
145#define ECONNREFUSED    111     /* Connection refused */
146#define EHOSTDOWN       112     /* Host is down */
147#define EHOSTUNREACH    113     /* No route to host */
148#define EALREADY        114     /* Operation already in progress */
149#define EINPROGRESS     115     /* Operation now in progress */
150#define ESTALE          116     /* Stale NFS file handle */
151#define EUCLEAN         117     /* Structure needs cleaning */
152#define ENOTNAM         118     /* Not a XENIX named type file */
153#define ENAVAIL         119     /* No XENIX semaphores available */
154#define EISNAM          120     /* Is a named type file */
155#define EREMOTEIO       121     /* Remote I/O error */
156#define EDQUOT          122     /* Quota exceeded */
157
158#define ENOMEDIUM       123     /* No medium found */
159#define EMEDIUMTYPE     124     /* Wrong medium type */
160#define ECANCELED       125     /* Operation Canceled */
161#define ENOKEY          126     /* Required key not available */
162#define EKEYEXPIRED     127     /* Key has expired */
163#define EKEYREVOKED     128     /* Key has been revoked */
164#define EKEYREJECTED    129     /* Key was rejected by service */
165
166#define EOWNERDEAD      130     /* Owner died */
167#define ENOTRECOVERABLE 131     /* State not recoverable */
168
169/* Widely known to be a synonym in Linux.  */
170#define ENOTSUP EOPNOTSUPP
171
172#define __ELASTERROR 2000       /* Users can add values starting here */
173
174#ifdef __cplusplus
175}
176#endif
177#endif /* _SYS_ERRNO_H */
Note: See TracBrowser for help on using the repository browser.