Optimize arithmetic with pointer to value on stack + constant
[tinycc/daniel.git] / win32 / include / errno.h
blobb41a70e01b3b7d1a5c3d6b9a00348e870ea6432e
1 /*
2 * errno.h
4 * Error numbers and access to error reporting.
6 * This file is part of the Mingw32 package.
8 * Contributors:
9 * Created by Colin Peters <colin@bird.fu.is.saga-u.ac.jp>
11 * THIS SOFTWARE IS NOT COPYRIGHTED
13 * This source code is offered for use in the public domain. You may
14 * use, modify or distribute it freely.
16 * This code is distributed in the hope that it will be useful but
17 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
18 * DISCLAIMED. This includes but is not limited to warranties of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 * $Revision: 1.2 $
22 * $Author: bellard $
23 * $Date: 2005/04/17 13:14:29 $
27 #ifndef _ERRNO_H_
28 #define _ERRNO_H_
30 /* All the headers include this file. */
31 #include <_mingw.h>
34 * Error numbers.
35 * TODO: Can't be sure of some of these assignments, I guessed from the
36 * names given by strerror and the defines in the Cygnus errno.h. A lot
37 * of the names from the Cygnus errno.h are not represented, and a few
38 * of the descriptions returned by strerror do not obviously match
39 * their error naming.
41 #define EPERM 1 /* Operation not permitted */
42 #define ENOFILE 2 /* No such file or directory */
43 #define ENOENT 2
44 #define ESRCH 3 /* No such process */
45 #define EINTR 4 /* Interrupted function call */
46 #define EIO 5 /* Input/output error */
47 #define ENXIO 6 /* No such device or address */
48 #define E2BIG 7 /* Arg list too long */
49 #define ENOEXEC 8 /* Exec format error */
50 #define EBADF 9 /* Bad file descriptor */
51 #define ECHILD 10 /* No child processes */
52 #define EAGAIN 11 /* Resource temporarily unavailable */
53 #define ENOMEM 12 /* Not enough space */
54 #define EACCES 13 /* Permission denied */
55 #define EFAULT 14 /* Bad address */
56 /* 15 - Unknown Error */
57 #define EBUSY 16 /* strerror reports "Resource device" */
58 #define EEXIST 17 /* File exists */
59 #define EXDEV 18 /* Improper link (cross-device link?) */
60 #define ENODEV 19 /* No such device */
61 #define ENOTDIR 20 /* Not a directory */
62 #define EISDIR 21 /* Is a directory */
63 #define EINVAL 22 /* Invalid argument */
64 #define ENFILE 23 /* Too many open files in system */
65 #define EMFILE 24 /* Too many open files */
66 #define ENOTTY 25 /* Inappropriate I/O control operation */
67 /* 26 - Unknown Error */
68 #define EFBIG 27 /* File too large */
69 #define ENOSPC 28 /* No space left on device */
70 #define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
71 #define EROFS 30 /* Read-only file system */
72 #define EMLINK 31 /* Too many links */
73 #define EPIPE 32 /* Broken pipe */
74 #define EDOM 33 /* Domain error (math functions) */
75 #define ERANGE 34 /* Result too large (possibly too small) */
76 /* 35 - Unknown Error */
77 #define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
78 #define EDEADLK 36
79 /* 37 - Unknown Error */
80 #define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
81 #define ENOLCK 39 /* No locks available (46 in Cyg?) */
82 #define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
83 #define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
84 #define EILSEQ 42 /* Illegal byte sequence */
87 * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
88 * sockets.h header provided with windows32api-0.1.2.
89 * You should go and put an #if 0 ... #endif around the whole block
90 * of errors (look at the comment above them).
93 #ifndef RC_INVOKED
95 #ifdef __cplusplus
96 extern "C" {
97 #endif
100 * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
101 * stdlib.h.
103 #ifdef _UWIN
104 #undef errno
105 extern int errno;
106 #else
107 int* _errno(void);
108 #define errno (*_errno())
109 #endif
111 #ifdef __cplusplus
113 #endif
115 #endif /* Not RC_INVOKED */
117 #endif /* Not _ERRNO_H_ */