Subversion Repositories Kolibri OS

Rev

Rev 8793 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8793 Rev 9766
Line 1... Line 1...
1
#ifndef _ERRNO_H_
1
#ifndef _ERRNO_H_
2
#define _ERRNO_H_
2
#define _ERRNO_H_
Line 3... Line 3...
3
 
3
 
Line 4... Line -...
4
#include 
-
 
5
 
-
 
6
#ifdef __cplusplus
-
 
7
extern "C" {
-
 
8
#endif
4
#include 
9
 
5
 
10
#ifdef _BUILD_LIBC
6
#ifdef _BUILD_LIBC
11
extern int _errno;
7
#define errno __errno
12
#define errno _errno 
8
extern int __errno;
13
#else
9
#else
14
extern int* _errno;
10
extern int* __errno;
Line 15... Line 11...
15
#define errno *_errno
11
#define errno *__errno
16
#endif
-
 
17
 
12
#endif
18
#define EPERM 1 /* Operation not permitted */
-
 
19
#define ENOENT 2 /* No such file or directory */
13
 
20
#define ESRCH 3 /* No such process */
14
#define ENOTSUP   2  // Function is not supported
21
#define EINTR 4 /* Interrupted system call */
15
#define EUNKNFS   3  // Unknown file system
22
#define EIO 5 /* Input/output error */
-
 
23
#define ENXIO 6 /* Device not configured */
16
#define ENOTFOUND 5  // File not found
24
#define E2BIG 7 /* Argument list too long */
17
#define EEOF      6  // End of file
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 */
18
#define EFAULT    7  // Pointer lies outside of application memory
29
/* 11 was EAGAIN */
19
#define EDQUOT    8  // Disk is full
30
#define ENOMEM 12 /* Cannot allocate memory */
20
#define EFS       9  // File system error
-
 
21
#define EACCES    10 // Access denied
31
#define EACCES 13 /* Permission denied */
22
#define EDEV      11 // Device error
32
#define EFAULT 14 /* Bad address */
23
#define ENOMEMFS  12 // File system requires more memory
33
#define ENOTBLK 15 /* Block device required */
-
 
34
#define EBUSY 16 /* Device / Resource busy */
-
 
35
#define EEXIST 17 /* File exists */
24
 
36
#define EXDEV 18 /* Cross-device link */
-
 
37
#define ENODEV 19 /* Operation not supported by device */
25
#define ENOMEM   30 // Not enough memory
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 */
26
#define ENOEXEC  31 // Is not executable
49
#define EMLINK 31 /* Too many links */
-
 
50
#define EPIPE 32 /* Broken pipe */
27
#define EPROCLIM 32 // Too many processes
51
 
28
#define EINVAL   33 // Invalid argument
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 */
29
 
58
#define EWOULDBLOCK EAGAIN /* Operation would block */
30
#define EDOM   50 // Numerical argument out of domain
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 */
31
#define ERANGE 51 // Result too large
65
#define EMSGSIZE 40 /* Message too long */
-
 
66
#define EPROTOTYPE 41 /* Protocol wrong type for socket */
-
 
67
#define ENOPROTOOPT 42 /* Protocol not available */
32
#define EILSEQ 52 // Illegal byte sequence
68
#define EPROTONOSUPPORT 43 /* Protocol not supported */
33
 
69
#define ESOCKTNOSUPPORT 44 /* Socket type not supported */
34
#define ENOBUFS      60 // Broken buffer
70
#define ENOTSUP 45 /* Operation not supported */
35
#define EINPROGRESS  61 // Operation now in progress
71
#define EOPNOTSUPP ENOTSUP /* Operation not supported on socket */
36
#define EOPNOTSUPP   62 // Operation not supported on transport endpoint
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 */
37
#define EWOULDBLOCK  63 // Operation would block
76
 
38
#define ENOTCONN     64 // Transport endpoint is not connected
77
/* ipc/network software -- operational errors */
-
 
78
#define ENETDOWN 50 /* Network is down */
39
#define EALREADY     65 // Operation already in progress
79
#define ENETUNREACH 51 /* Network is unreachable */
40
#define EMSGSIZE     66 // Message too long
80
#define ENETRESET 52 /* Network dropped connection on reset */
-
 
81
#define ECONNABORTED 53 /* Software caused connection abort */
41
#define EADDRINUSE   67 // Address already in use
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 */
42
#define ECONNREFUSED 68 // Connection refused
86
#define ESHUTDOWN 58 /* Can't send after socket shutdown */
43
#define ECONNRESET   69 // Connection reset by peer
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 */
44
#define EISCONN      70 // Transport endpoint is already connected
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 */
45
#define ETIMEDOUT    71 // Connection timed out
100
#define EUSERS 68 /* Too many users */
46
#define ECONNABORTED 72 // Software caused connection abort
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 */
47
 
112
#define ENOSYS 78 /* Function not implemented */
-
 
113
#define EFTYPE 79 /* Inappropriate file type or format */
48
/*
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 */
49
* UNIX-like errno
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 */
50
* Will be removed after changing STDIO.
129
#define ENOMSG 91 /* No message of desired type */
51
*/
130
#define EILSEQ 92 /* Illegal byte sequence */
52
 
131
#define ENOATTR 93 /* Attribute not found */
-
 
132
#define EBADMSG 94 /* Bad message */
53
#define ENOTDIR   80
133
#define EMULTIHOP 95 /* Reserved */
-
 
134
#define ENODATA 96 /* No message available on STREAM */
54
#define EBADF     81
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 */
55
#define EIO       82
144
#define ELAST 106 /* Must be equal largest errno */
-
 
145
 
-
 
Line 146... Line 56...
146
#ifdef __cplusplus
56
#define EISDIR    83