Subversion Repositories Kolibri OS

Rev

Rev 8687 | Rev 8793 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8687 turbocat 1
#ifndef _ERRNO_H_
2
#define _ERRNO_H_
3
 
4
#include 
5
 
6
#ifdef __cplusplus
7
extern "C" {
8
#endif
9
 
8787 turbocat 10
#ifdef _BUILD_LIBC
11
extern int _errno;
12
#define errno _errno
13
#else
14
extern int* _errno;
15
#define errno *_errno
16
#endif
8687 turbocat 17
 
18
#define EPERM 1 /* Operation not permitted */
19
#define ENOENT 2 /* No such file or directory */
20
#define ESRCH 3 /* No such process */
21
#define EINTR 4 /* Interrupted system call */
22
#define EIO 5 /* Input/output error */
23
#define ENXIO 6 /* Device not configured */
24
#define E2BIG 7 /* Argument list too long */
25
#define ENOEXEC 8 /* Exec format error */
26
#define EBADF 9 /* Bad file descriptor */
27
#define ECHILD 10 /* No child processes */
28
#define EDEADLK 11 /* Resource deadlock avoided */
29
/* 11 was EAGAIN */
30
#define ENOMEM 12 /* Cannot allocate memory */
31
#define EACCES 13 /* Permission denied */
32
#define EFAULT 14 /* Bad address */
33
#define ENOTBLK 15 /* Block device required */
34
#define EBUSY 16 /* Device / Resource busy */
35
#define EEXIST 17 /* File exists */
36
#define EXDEV 18 /* Cross-device link */
37
#define ENODEV 19 /* Operation not supported by device */
38
#define ENOTDIR 20 /* Not a directory */
39
#define EISDIR 21 /* Is a directory */
40
#define EINVAL 22 /* Invalid argument */
41
#define ENFILE 23 /* Too many open files in system */
42
#define EMFILE 24 /* Too many open files */
43
#define ENOTTY 25 /* Inappropriate ioctl for device */
44
#define ETXTBSY 26 /* Text file busy */
45
#define EFBIG 27 /* File too large */
46
#define ENOSPC 28 /* No space left on device */
47
#define ESPIPE 29 /* Illegal seek */
48
#define EROFS 30 /* Read-only file system */
49
#define EMLINK 31 /* Too many links */
50
#define EPIPE 32 /* Broken pipe */
51
 
52
/* math software */
53
#define EDOM 33 /* Numerical argument out of domain */
54
#define ERANGE 34 /* Result too large */
55
 
56
/* non-blocking and interrupt i/o */
57
#define EAGAIN 35 /* Resource temporarily unavailable */
58
#define EWOULDBLOCK EAGAIN /* Operation would block */
59
#define EINPROGRESS 36 /* Operation now in progress */
60
#define EALREADY 37 /* Operation already in progress */
61
 
62
/* ipc/network software -- argument errors */
63
#define ENOTSOCK 38 /* Socket operation on non-socket */
64
#define EDESTADDRREQ 39 /* Destination address required */
65
#define EMSGSIZE 40 /* Message too long */
66
#define EPROTOTYPE 41 /* Protocol wrong type for socket */
67
#define ENOPROTOOPT 42 /* Protocol not available */
68
#define EPROTONOSUPPORT 43 /* Protocol not supported */
69
#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
70
#define ENOTSUP 45 /* Operation not supported */
71
#define EOPNOTSUPP ENOTSUP /* Operation not supported on socket */
72
#define EPFNOSUPPORT 46 /* Protocol family not supported */
73
#define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
74
#define EADDRINUSE 48 /* Address already in use */
75
#define EADDRNOTAVAIL 49 /* Can't assign requested address */
76
 
77
/* ipc/network software -- operational errors */
78
#define ENETDOWN 50 /* Network is down */
79
#define ENETUNREACH 51 /* Network is unreachable */
80
#define ENETRESET 52 /* Network dropped connection on reset */
81
#define ECONNABORTED 53 /* Software caused connection abort */
82
#define ECONNRESET 54 /* Connection reset by peer */
83
#define ENOBUFS 55 /* No buffer space available */
84
#define EISCONN 56 /* Socket is already connected */
85
#define ENOTCONN 57 /* Socket is not connected */
86
#define ESHUTDOWN 58 /* Can't send after socket shutdown */
87
#define ETOOMANYREFS 59 /* Too many references: can't splice */
88
#define ETIMEDOUT 60 /* Operation timed out */
89
#define ECONNREFUSED 61 /* Connection refused */
90
#define ELOOP 62 /* Too many levels of symbolic links */
91
#define ENAMETOOLONG 63 /* File name too long */
92
 
93
/* should be rearranged */
94
#define EHOSTDOWN 64 /* Host is down */
95
#define EHOSTUNREACH 65 /* No route to host */
96
#define ENOTEMPTY 66 /* Directory not empty */
97
 
98
/* quotas & mush */
99
#define EPROCLIM 67 /* Too many processes */
100
#define EUSERS 68 /* Too many users */
101
#define EDQUOT 69 /* Disc quota exceeded */
102
 
103
/* Network File System */
104
#define ESTALE 70 /* Stale NFS file handle */
105
#define EREMOTE 71 /* Too many levels of remote in path */
106
#define EBADRPC 72 /* RPC struct is bad */
107
#define ERPCMISMATCH 73 /* RPC version wrong */
108
#define EPROGUNAVAIL 74 /* RPC prog. not avail */
109
#define EPROGMISMATCH 75 /* Program version wrong */
110
#define EPROCUNAVAIL 76 /* Bad procedure for program */
111
#define ENOLCK 77 /* No locks available */
112
#define ENOSYS 78 /* Function not implemented */
113
#define EFTYPE 79 /* Inappropriate file type or format */
114
#define EAUTH 80 /* Authentication error */
115
#define ENEEDAUTH 81 /* Need authenticator */
116
 
117
/* Intelligent device errors */
118
#define EPWROFF 82 /* Device power is off */
119
#define EDEVERR 83 /* Device error, e.g. paper out */
120
#define EOVERFLOW 84 /* Value too large to be stored in data type */
121
 
122
/* Program loading errors */
123
#define EBADEXEC 85 /* Bad executable */
124
#define EBADARCH 86 /* Bad CPU type in executable */
125
#define ESHLIBVERS 87 /* Shared library version mismatch */
126
#define EBADMACHO 88 /* Malformed Macho file */
127
#define ECANCELED 89 /* Operation canceled */
128
#define EIDRM 90 /* Identifier removed */
129
#define ENOMSG 91 /* No message of desired type */
130
#define EILSEQ 92 /* Illegal byte sequence */
131
#define ENOATTR 93 /* Attribute not found */
132
#define EBADMSG 94 /* Bad message */
133
#define EMULTIHOP 95 /* Reserved */
134
#define ENODATA 96 /* No message available on STREAM */
135
#define ENOLINK 97 /* Reserved */
136
#define ENOSR 98 /* No STREAM resources */
137
#define ENOSTR 99 /* Not a STREAM */
138
#define EPROTO 100 /* Protocol error */
139
#define ETIME 101 /* STREAM ioctl timeout */
140
#define ENOPOLICY 103 /* No such policy registered */
141
#define ENOTRECOVERABLE 104 /* State not recoverable */
142
#define EOWNERDEAD 105 /* Previous owner died */
143
#define EQFULL 106 /* Interface output queue is full */
144
#define ELAST 106 /* Must be equal largest errno */
145
 
146
#ifdef __cplusplus
147
}
148
#endif
149
 
8787 turbocat 150
#endif // _ERRNO_H_