source: Daodan/MinGW/include/errno.h@ 1098

Last change on this file since 1098 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 3.2 KB
Line 
1/*
2 * errno.h
3 * This file has no copyright assigned and is placed in the Public Domain.
4 * This file is a part of the mingw-runtime package.
5 * No warranty is given; refer to the file DISCLAIMER within the package.
6 *
7 * Error numbers and access to error reporting.
8 *
9 */
10
11#ifndef _ERRNO_H_
12#define _ERRNO_H_
13
14/* All the headers include this file. */
15#include <_mingw.h>
16
17/*
18 * Error numbers.
19 * TODO: Can't be sure of some of these assignments, I guessed from the
20 * names given by strerror and the defines in the Cygnus errno.h. A lot
21 * of the names from the Cygnus errno.h are not represented, and a few
22 * of the descriptions returned by strerror do not obviously match
23 * their error naming.
24 */
25#define EPERM 1 /* Operation not permitted */
26#define ENOFILE 2 /* No such file or directory */
27#define ENOENT 2
28#define ESRCH 3 /* No such process */
29#define EINTR 4 /* Interrupted function call */
30#define EIO 5 /* Input/output error */
31#define ENXIO 6 /* No such device or address */
32#define E2BIG 7 /* Arg list too long */
33#define ENOEXEC 8 /* Exec format error */
34#define EBADF 9 /* Bad file descriptor */
35#define ECHILD 10 /* No child processes */
36#define EAGAIN 11 /* Resource temporarily unavailable */
37#define ENOMEM 12 /* Not enough space */
38#define EACCES 13 /* Permission denied */
39#define EFAULT 14 /* Bad address */
40/* 15 - Unknown Error */
41#define EBUSY 16 /* strerror reports "Resource device" */
42#define EEXIST 17 /* File exists */
43#define EXDEV 18 /* Improper link (cross-device link?) */
44#define ENODEV 19 /* No such device */
45#define ENOTDIR 20 /* Not a directory */
46#define EISDIR 21 /* Is a directory */
47#define EINVAL 22 /* Invalid argument */
48#define ENFILE 23 /* Too many open files in system */
49#define EMFILE 24 /* Too many open files */
50#define ENOTTY 25 /* Inappropriate I/O control operation */
51/* 26 - Unknown Error */
52#define EFBIG 27 /* File too large */
53#define ENOSPC 28 /* No space left on device */
54#define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
55#define EROFS 30 /* Read-only file system */
56#define EMLINK 31 /* Too many links */
57#define EPIPE 32 /* Broken pipe */
58#define EDOM 33 /* Domain error (math functions) */
59#define ERANGE 34 /* Result too large (possibly too small) */
60/* 35 - Unknown Error */
61#define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
62#define EDEADLK 36
63/* 37 - Unknown Error */
64#define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
65#define ENOLCK 39 /* No locks available (46 in Cyg?) */
66#define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
67#define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
68#define EILSEQ 42 /* Illegal byte sequence */
69
70/*
71 * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
72 * sockets.h header provided with windows32api-0.1.2.
73 * You should go and put an #if 0 ... #endif around the whole block
74 * of errors (look at the comment above them).
75 */
76
77#ifndef RC_INVOKED
78
79#ifdef __cplusplus
80extern "C" {
81#endif
82
83/*
84 * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
85 * stdlib.h.
86 */
87#ifdef _UWIN
88#undef errno
89extern int errno;
90#else
91_CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
92#define errno (*_errno())
93#endif
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif /* Not RC_INVOKED */
100
101#endif /* Not _ERRNO_H_ */
Note: See TracBrowser for help on using the repository browser.