Home | History | Annotate | Download | only in include
      1 /**
      2  * This file has no copyright assigned and is placed in the Public Domain.
      3  * This file is part of the mingw-w64 runtime package.
      4  * No warranty is given; refer to the file DISCLAIMER.PD within this package.
      5  */
      6 #ifndef _INC_ERRNO
      7 #define _INC_ERRNO
      8 
      9 #include <crtdefs.h>
     10 
     11 #ifdef __cplusplus
     12 extern "C" {
     13 #endif
     14 
     15 #ifndef _CRT_ERRNO_DEFINED
     16 #define _CRT_ERRNO_DEFINED
     17 _CRTIMP extern int *__cdecl _errno(void);
     18 #define errno (*_errno())
     19 
     20 errno_t __cdecl _set_errno(int _Value);
     21 errno_t __cdecl _get_errno(int *_Value);
     22 #endif /* _CRT_ERRNO_DEFINED */
     23 
     24 #define EPERM 1
     25 #define ENOENT 2
     26 #define ENOFILE ENOENT
     27 #define ESRCH 3
     28 #define EINTR 4
     29 #define EIO 5
     30 #define ENXIO 6
     31 #define E2BIG 7
     32 #define ENOEXEC 8
     33 #define EBADF 9
     34 #define ECHILD 10
     35 #define EAGAIN 11
     36 #define ENOMEM 12
     37 #define EACCES 13
     38 #define EFAULT 14
     39 #define EBUSY 16
     40 #define EEXIST 17
     41 #define EXDEV 18
     42 #define ENODEV 19
     43 #define ENOTDIR 20
     44 #define EISDIR 21
     45 #define ENFILE 23
     46 #define EMFILE 24
     47 #define ENOTTY 25
     48 #define EFBIG 27
     49 #define ENOSPC 28
     50 #define ESPIPE 29
     51 #define EROFS 30
     52 #define EMLINK 31
     53 #define EPIPE 32
     54 #define EDOM 33
     55 #define EDEADLK 36
     56 #define ENAMETOOLONG 38
     57 #define ENOLCK 39
     58 #define ENOSYS 40
     59 #define ENOTEMPTY 41
     60 
     61 #ifndef RC_INVOKED
     62 #if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
     63 #define _SECURECRT_ERRCODE_VALUES_DEFINED
     64 #define EINVAL 22
     65 #define ERANGE 34
     66 #define EILSEQ 42
     67 #define STRUNCATE 80
     68 #endif
     69 #endif
     70 
     71 #define EDEADLOCK EDEADLK
     72 
     73 /* Posix thread extensions.  */
     74 
     75 #ifndef ENOTSUP
     76 #define ENOTSUP         129
     77 #endif
     78 
     79 /* Extension defined as by report VC 10+ defines error-numbers.  */
     80 
     81 #ifndef EAFNOSUPPORT
     82 #define EAFNOSUPPORT 102
     83 #endif
     84 
     85 #ifndef EADDRINUSE
     86 #define EADDRINUSE 100
     87 #endif
     88 
     89 #ifndef EADDRNOTAVAIL
     90 #define EADDRNOTAVAIL 101
     91 #endif
     92 
     93 #ifndef EISCONN
     94 #define EISCONN 113
     95 #endif
     96 
     97 #ifndef ENOBUFS
     98 #define ENOBUFS 119
     99 #endif
    100 
    101 #ifndef ECONNABORTED
    102 #define ECONNABORTED 106
    103 #endif
    104 
    105 #ifndef EALREADY
    106 #define EALREADY 103
    107 #endif
    108 
    109 #ifndef ECONNREFUSED
    110 #define ECONNREFUSED 107
    111 #endif
    112 
    113 #ifndef ECONNRESET
    114 #define ECONNRESET 108
    115 #endif
    116 
    117 #ifndef EDESTADDRREQ
    118 #define EDESTADDRREQ 109
    119 #endif
    120 
    121 #ifndef EHOSTUNREACH
    122 #define EHOSTUNREACH 110
    123 #endif
    124 
    125 #ifndef EMSGSIZE
    126 #define EMSGSIZE 115
    127 #endif
    128 
    129 #ifndef ENETDOWN
    130 #define ENETDOWN 116
    131 #endif
    132 
    133 #ifndef ENETRESET
    134 #define ENETRESET 117
    135 #endif
    136 
    137 #ifndef ENETUNREACH
    138 #define ENETUNREACH 118
    139 #endif
    140 
    141 #ifndef ENOPROTOOPT
    142 #define ENOPROTOOPT 123
    143 #endif
    144 
    145 #ifndef ENOTSOCK
    146 #define ENOTSOCK 128
    147 #endif
    148 
    149 #ifndef ENOTCONN
    150 #define ENOTCONN 126
    151 #endif
    152 
    153 #ifndef ECANCELED
    154 #define ECANCELED 105
    155 #endif
    156 
    157 #ifndef EINPROGRESS
    158 #define EINPROGRESS 112
    159 #endif
    160 
    161 #ifndef EOPNOTSUPP
    162 #define EOPNOTSUPP 130
    163 #endif
    164 
    165 #ifndef EWOULDBLOCK
    166 #define EWOULDBLOCK 140
    167 #endif
    168 
    169 #ifndef EOWNERDEAD
    170 #define EOWNERDEAD 133
    171 #endif
    172 
    173 #ifndef EPROTO
    174 #define EPROTO 134
    175 #endif
    176 
    177 #ifndef EPROTONOSUPPORT
    178 #define EPROTONOSUPPORT 135
    179 #endif
    180 
    181 /* Defined as WSAETIMEDOUT.  */
    182 #ifndef ETIMEDOUT
    183 #define ETIMEDOUT 138
    184 #endif
    185 
    186 #ifndef ELOOP
    187 #define ELOOP 114
    188 #endif
    189 
    190 #ifndef EPROTOTYPE
    191 #define EPROTOTYPE 136
    192 #endif
    193 
    194 #ifndef EOVERFLOW
    195 #define EOVERFLOW 132
    196 #endif
    197 
    198 #ifdef __cplusplus
    199 }
    200 #endif
    201 #endif
    202