Home | History | Annotate | Line # | Download | only in uv
      1      1.1  christos /* Copyright Joyent, Inc. and other Node contributors. All rights reserved.
      2      1.1  christos  *
      3      1.1  christos  * Permission is hereby granted, free of charge, to any person obtaining a copy
      4      1.1  christos  * of this software and associated documentation files (the "Software"), to
      5      1.1  christos  * deal in the Software without restriction, including without limitation the
      6      1.1  christos  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
      7      1.1  christos  * sell copies of the Software, and to permit persons to whom the Software is
      8      1.1  christos  * furnished to do so, subject to the following conditions:
      9      1.1  christos  *
     10      1.1  christos  * The above copyright notice and this permission notice shall be included in
     11      1.1  christos  * all copies or substantial portions of the Software.
     12      1.1  christos  *
     13      1.1  christos  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     14      1.1  christos  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     15      1.1  christos  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
     16      1.1  christos  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
     17      1.1  christos  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
     18      1.1  christos  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
     19      1.1  christos  * IN THE SOFTWARE.
     20      1.1  christos  */
     21      1.1  christos 
     22      1.1  christos #ifndef UV_ERRNO_H_
     23      1.1  christos #define UV_ERRNO_H_
     24      1.1  christos 
     25      1.1  christos #include <errno.h>
     26      1.1  christos #if EDOM > 0
     27      1.1  christos # define UV__ERR(x) (-(x))
     28      1.1  christos #else
     29      1.1  christos # define UV__ERR(x) (x)
     30      1.1  christos #endif
     31      1.1  christos 
     32      1.1  christos #define UV__EOF     (-4095)
     33      1.1  christos #define UV__UNKNOWN (-4094)
     34      1.1  christos 
     35      1.1  christos #define UV__EAI_ADDRFAMILY  (-3000)
     36      1.1  christos #define UV__EAI_AGAIN       (-3001)
     37      1.1  christos #define UV__EAI_BADFLAGS    (-3002)
     38      1.1  christos #define UV__EAI_CANCELED    (-3003)
     39      1.1  christos #define UV__EAI_FAIL        (-3004)
     40      1.1  christos #define UV__EAI_FAMILY      (-3005)
     41      1.1  christos #define UV__EAI_MEMORY      (-3006)
     42      1.1  christos #define UV__EAI_NODATA      (-3007)
     43      1.1  christos #define UV__EAI_NONAME      (-3008)
     44      1.1  christos #define UV__EAI_OVERFLOW    (-3009)
     45      1.1  christos #define UV__EAI_SERVICE     (-3010)
     46      1.1  christos #define UV__EAI_SOCKTYPE    (-3011)
     47      1.1  christos #define UV__EAI_BADHINTS    (-3013)
     48      1.1  christos #define UV__EAI_PROTOCOL    (-3014)
     49      1.1  christos 
     50      1.1  christos /* Only map to the system errno on non-Windows platforms. It's apparently
     51      1.1  christos  * a fairly common practice for Windows programmers to redefine errno codes.
     52      1.1  christos  */
     53      1.1  christos #if defined(E2BIG) && !defined(_WIN32)
     54      1.1  christos # define UV__E2BIG UV__ERR(E2BIG)
     55      1.1  christos #else
     56      1.1  christos # define UV__E2BIG (-4093)
     57      1.1  christos #endif
     58      1.1  christos 
     59      1.1  christos #if defined(EACCES) && !defined(_WIN32)
     60      1.1  christos # define UV__EACCES UV__ERR(EACCES)
     61      1.1  christos #else
     62      1.1  christos # define UV__EACCES (-4092)
     63      1.1  christos #endif
     64      1.1  christos 
     65      1.1  christos #if defined(EADDRINUSE) && !defined(_WIN32)
     66      1.1  christos # define UV__EADDRINUSE UV__ERR(EADDRINUSE)
     67      1.1  christos #else
     68      1.1  christos # define UV__EADDRINUSE (-4091)
     69      1.1  christos #endif
     70      1.1  christos 
     71      1.1  christos #if defined(EADDRNOTAVAIL) && !defined(_WIN32)
     72      1.1  christos # define UV__EADDRNOTAVAIL UV__ERR(EADDRNOTAVAIL)
     73      1.1  christos #else
     74      1.1  christos # define UV__EADDRNOTAVAIL (-4090)
     75      1.1  christos #endif
     76      1.1  christos 
     77      1.1  christos #if defined(EAFNOSUPPORT) && !defined(_WIN32)
     78      1.1  christos # define UV__EAFNOSUPPORT UV__ERR(EAFNOSUPPORT)
     79      1.1  christos #else
     80      1.1  christos # define UV__EAFNOSUPPORT (-4089)
     81      1.1  christos #endif
     82      1.1  christos 
     83      1.1  christos #if defined(EAGAIN) && !defined(_WIN32)
     84      1.1  christos # define UV__EAGAIN UV__ERR(EAGAIN)
     85      1.1  christos #else
     86      1.1  christos # define UV__EAGAIN (-4088)
     87      1.1  christos #endif
     88      1.1  christos 
     89      1.1  christos #if defined(EALREADY) && !defined(_WIN32)
     90      1.1  christos # define UV__EALREADY UV__ERR(EALREADY)
     91      1.1  christos #else
     92      1.1  christos # define UV__EALREADY (-4084)
     93      1.1  christos #endif
     94      1.1  christos 
     95      1.1  christos #if defined(EBADF) && !defined(_WIN32)
     96      1.1  christos # define UV__EBADF UV__ERR(EBADF)
     97      1.1  christos #else
     98      1.1  christos # define UV__EBADF (-4083)
     99      1.1  christos #endif
    100      1.1  christos 
    101      1.1  christos #if defined(EBUSY) && !defined(_WIN32)
    102      1.1  christos # define UV__EBUSY UV__ERR(EBUSY)
    103      1.1  christos #else
    104      1.1  christos # define UV__EBUSY (-4082)
    105      1.1  christos #endif
    106      1.1  christos 
    107      1.1  christos #if defined(ECANCELED) && !defined(_WIN32)
    108      1.1  christos # define UV__ECANCELED UV__ERR(ECANCELED)
    109      1.1  christos #else
    110      1.1  christos # define UV__ECANCELED (-4081)
    111      1.1  christos #endif
    112      1.1  christos 
    113      1.1  christos #if defined(ECHARSET) && !defined(_WIN32)
    114      1.1  christos # define UV__ECHARSET UV__ERR(ECHARSET)
    115      1.1  christos #else
    116      1.1  christos # define UV__ECHARSET (-4080)
    117      1.1  christos #endif
    118      1.1  christos 
    119      1.1  christos #if defined(ECONNABORTED) && !defined(_WIN32)
    120      1.1  christos # define UV__ECONNABORTED UV__ERR(ECONNABORTED)
    121      1.1  christos #else
    122      1.1  christos # define UV__ECONNABORTED (-4079)
    123      1.1  christos #endif
    124      1.1  christos 
    125      1.1  christos #if defined(ECONNREFUSED) && !defined(_WIN32)
    126      1.1  christos # define UV__ECONNREFUSED UV__ERR(ECONNREFUSED)
    127      1.1  christos #else
    128      1.1  christos # define UV__ECONNREFUSED (-4078)
    129      1.1  christos #endif
    130      1.1  christos 
    131      1.1  christos #if defined(ECONNRESET) && !defined(_WIN32)
    132      1.1  christos # define UV__ECONNRESET UV__ERR(ECONNRESET)
    133      1.1  christos #else
    134      1.1  christos # define UV__ECONNRESET (-4077)
    135      1.1  christos #endif
    136      1.1  christos 
    137      1.1  christos #if defined(EDESTADDRREQ) && !defined(_WIN32)
    138      1.1  christos # define UV__EDESTADDRREQ UV__ERR(EDESTADDRREQ)
    139      1.1  christos #else
    140      1.1  christos # define UV__EDESTADDRREQ (-4076)
    141      1.1  christos #endif
    142      1.1  christos 
    143      1.1  christos #if defined(EEXIST) && !defined(_WIN32)
    144      1.1  christos # define UV__EEXIST UV__ERR(EEXIST)
    145      1.1  christos #else
    146      1.1  christos # define UV__EEXIST (-4075)
    147      1.1  christos #endif
    148      1.1  christos 
    149      1.1  christos #if defined(EFAULT) && !defined(_WIN32)
    150      1.1  christos # define UV__EFAULT UV__ERR(EFAULT)
    151      1.1  christos #else
    152      1.1  christos # define UV__EFAULT (-4074)
    153      1.1  christos #endif
    154      1.1  christos 
    155      1.1  christos #if defined(EHOSTUNREACH) && !defined(_WIN32)
    156      1.1  christos # define UV__EHOSTUNREACH UV__ERR(EHOSTUNREACH)
    157      1.1  christos #else
    158      1.1  christos # define UV__EHOSTUNREACH (-4073)
    159      1.1  christos #endif
    160      1.1  christos 
    161      1.1  christos #if defined(EINTR) && !defined(_WIN32)
    162      1.1  christos # define UV__EINTR UV__ERR(EINTR)
    163      1.1  christos #else
    164      1.1  christos # define UV__EINTR (-4072)
    165      1.1  christos #endif
    166      1.1  christos 
    167      1.1  christos #if defined(EINVAL) && !defined(_WIN32)
    168      1.1  christos # define UV__EINVAL UV__ERR(EINVAL)
    169      1.1  christos #else
    170      1.1  christos # define UV__EINVAL (-4071)
    171      1.1  christos #endif
    172      1.1  christos 
    173      1.1  christos #if defined(EIO) && !defined(_WIN32)
    174      1.1  christos # define UV__EIO UV__ERR(EIO)
    175      1.1  christos #else
    176      1.1  christos # define UV__EIO (-4070)
    177      1.1  christos #endif
    178      1.1  christos 
    179      1.1  christos #if defined(EISCONN) && !defined(_WIN32)
    180      1.1  christos # define UV__EISCONN UV__ERR(EISCONN)
    181      1.1  christos #else
    182      1.1  christos # define UV__EISCONN (-4069)
    183      1.1  christos #endif
    184      1.1  christos 
    185      1.1  christos #if defined(EISDIR) && !defined(_WIN32)
    186      1.1  christos # define UV__EISDIR UV__ERR(EISDIR)
    187      1.1  christos #else
    188      1.1  christos # define UV__EISDIR (-4068)
    189      1.1  christos #endif
    190      1.1  christos 
    191      1.1  christos #if defined(ELOOP) && !defined(_WIN32)
    192      1.1  christos # define UV__ELOOP UV__ERR(ELOOP)
    193      1.1  christos #else
    194      1.1  christos # define UV__ELOOP (-4067)
    195      1.1  christos #endif
    196      1.1  christos 
    197      1.1  christos #if defined(EMFILE) && !defined(_WIN32)
    198      1.1  christos # define UV__EMFILE UV__ERR(EMFILE)
    199      1.1  christos #else
    200      1.1  christos # define UV__EMFILE (-4066)
    201      1.1  christos #endif
    202      1.1  christos 
    203      1.1  christos #if defined(EMSGSIZE) && !defined(_WIN32)
    204      1.1  christos # define UV__EMSGSIZE UV__ERR(EMSGSIZE)
    205      1.1  christos #else
    206      1.1  christos # define UV__EMSGSIZE (-4065)
    207      1.1  christos #endif
    208      1.1  christos 
    209      1.1  christos #if defined(ENAMETOOLONG) && !defined(_WIN32)
    210      1.1  christos # define UV__ENAMETOOLONG UV__ERR(ENAMETOOLONG)
    211      1.1  christos #else
    212      1.1  christos # define UV__ENAMETOOLONG (-4064)
    213      1.1  christos #endif
    214      1.1  christos 
    215      1.1  christos #if defined(ENETDOWN) && !defined(_WIN32)
    216      1.1  christos # define UV__ENETDOWN UV__ERR(ENETDOWN)
    217      1.1  christos #else
    218      1.1  christos # define UV__ENETDOWN (-4063)
    219      1.1  christos #endif
    220      1.1  christos 
    221      1.1  christos #if defined(ENETUNREACH) && !defined(_WIN32)
    222      1.1  christos # define UV__ENETUNREACH UV__ERR(ENETUNREACH)
    223      1.1  christos #else
    224      1.1  christos # define UV__ENETUNREACH (-4062)
    225      1.1  christos #endif
    226      1.1  christos 
    227      1.1  christos #if defined(ENFILE) && !defined(_WIN32)
    228      1.1  christos # define UV__ENFILE UV__ERR(ENFILE)
    229      1.1  christos #else
    230      1.1  christos # define UV__ENFILE (-4061)
    231      1.1  christos #endif
    232      1.1  christos 
    233      1.1  christos #if defined(ENOBUFS) && !defined(_WIN32)
    234      1.1  christos # define UV__ENOBUFS UV__ERR(ENOBUFS)
    235      1.1  christos #else
    236      1.1  christos # define UV__ENOBUFS (-4060)
    237      1.1  christos #endif
    238      1.1  christos 
    239      1.1  christos #if defined(ENODEV) && !defined(_WIN32)
    240      1.1  christos # define UV__ENODEV UV__ERR(ENODEV)
    241      1.1  christos #else
    242      1.1  christos # define UV__ENODEV (-4059)
    243      1.1  christos #endif
    244      1.1  christos 
    245      1.1  christos #if defined(ENOENT) && !defined(_WIN32)
    246      1.1  christos # define UV__ENOENT UV__ERR(ENOENT)
    247      1.1  christos #else
    248      1.1  christos # define UV__ENOENT (-4058)
    249      1.1  christos #endif
    250      1.1  christos 
    251      1.1  christos #if defined(ENOMEM) && !defined(_WIN32)
    252      1.1  christos # define UV__ENOMEM UV__ERR(ENOMEM)
    253      1.1  christos #else
    254      1.1  christos # define UV__ENOMEM (-4057)
    255      1.1  christos #endif
    256      1.1  christos 
    257      1.1  christos #if defined(ENONET) && !defined(_WIN32)
    258      1.1  christos # define UV__ENONET UV__ERR(ENONET)
    259      1.1  christos #else
    260      1.1  christos # define UV__ENONET (-4056)
    261      1.1  christos #endif
    262      1.1  christos 
    263      1.1  christos #if defined(ENOSPC) && !defined(_WIN32)
    264      1.1  christos # define UV__ENOSPC UV__ERR(ENOSPC)
    265      1.1  christos #else
    266      1.1  christos # define UV__ENOSPC (-4055)
    267      1.1  christos #endif
    268      1.1  christos 
    269      1.1  christos #if defined(ENOSYS) && !defined(_WIN32)
    270      1.1  christos # define UV__ENOSYS UV__ERR(ENOSYS)
    271      1.1  christos #else
    272      1.1  christos # define UV__ENOSYS (-4054)
    273      1.1  christos #endif
    274      1.1  christos 
    275      1.1  christos #if defined(ENOTCONN) && !defined(_WIN32)
    276      1.1  christos # define UV__ENOTCONN UV__ERR(ENOTCONN)
    277      1.1  christos #else
    278      1.1  christos # define UV__ENOTCONN (-4053)
    279      1.1  christos #endif
    280      1.1  christos 
    281      1.1  christos #if defined(ENOTDIR) && !defined(_WIN32)
    282      1.1  christos # define UV__ENOTDIR UV__ERR(ENOTDIR)
    283      1.1  christos #else
    284      1.1  christos # define UV__ENOTDIR (-4052)
    285      1.1  christos #endif
    286      1.1  christos 
    287      1.1  christos #if defined(ENOTEMPTY) && !defined(_WIN32)
    288      1.1  christos # define UV__ENOTEMPTY UV__ERR(ENOTEMPTY)
    289      1.1  christos #else
    290      1.1  christos # define UV__ENOTEMPTY (-4051)
    291      1.1  christos #endif
    292      1.1  christos 
    293      1.1  christos #if defined(ENOTSOCK) && !defined(_WIN32)
    294      1.1  christos # define UV__ENOTSOCK UV__ERR(ENOTSOCK)
    295      1.1  christos #else
    296      1.1  christos # define UV__ENOTSOCK (-4050)
    297      1.1  christos #endif
    298      1.1  christos 
    299      1.1  christos #if defined(ENOTSUP) && !defined(_WIN32)
    300      1.1  christos # define UV__ENOTSUP UV__ERR(ENOTSUP)
    301      1.1  christos #else
    302      1.1  christos # define UV__ENOTSUP (-4049)
    303      1.1  christos #endif
    304      1.1  christos 
    305      1.1  christos #if defined(EPERM) && !defined(_WIN32)
    306      1.1  christos # define UV__EPERM UV__ERR(EPERM)
    307      1.1  christos #else
    308      1.1  christos # define UV__EPERM (-4048)
    309      1.1  christos #endif
    310      1.1  christos 
    311      1.1  christos #if defined(EPIPE) && !defined(_WIN32)
    312      1.1  christos # define UV__EPIPE UV__ERR(EPIPE)
    313      1.1  christos #else
    314      1.1  christos # define UV__EPIPE (-4047)
    315      1.1  christos #endif
    316      1.1  christos 
    317      1.1  christos #if defined(EPROTO) && !defined(_WIN32)
    318      1.1  christos # define UV__EPROTO UV__ERR(EPROTO)
    319      1.1  christos #else
    320  1.1.1.2  christos # define UV__EPROTO (-4046)
    321      1.1  christos #endif
    322      1.1  christos 
    323      1.1  christos #if defined(EPROTONOSUPPORT) && !defined(_WIN32)
    324      1.1  christos # define UV__EPROTONOSUPPORT UV__ERR(EPROTONOSUPPORT)
    325      1.1  christos #else
    326      1.1  christos # define UV__EPROTONOSUPPORT (-4045)
    327      1.1  christos #endif
    328      1.1  christos 
    329      1.1  christos #if defined(EPROTOTYPE) && !defined(_WIN32)
    330      1.1  christos # define UV__EPROTOTYPE UV__ERR(EPROTOTYPE)
    331      1.1  christos #else
    332      1.1  christos # define UV__EPROTOTYPE (-4044)
    333      1.1  christos #endif
    334      1.1  christos 
    335      1.1  christos #if defined(EROFS) && !defined(_WIN32)
    336      1.1  christos # define UV__EROFS UV__ERR(EROFS)
    337      1.1  christos #else
    338      1.1  christos # define UV__EROFS (-4043)
    339      1.1  christos #endif
    340      1.1  christos 
    341      1.1  christos #if defined(ESHUTDOWN) && !defined(_WIN32)
    342      1.1  christos # define UV__ESHUTDOWN UV__ERR(ESHUTDOWN)
    343      1.1  christos #else
    344      1.1  christos # define UV__ESHUTDOWN (-4042)
    345      1.1  christos #endif
    346      1.1  christos 
    347      1.1  christos #if defined(ESPIPE) && !defined(_WIN32)
    348      1.1  christos # define UV__ESPIPE UV__ERR(ESPIPE)
    349      1.1  christos #else
    350      1.1  christos # define UV__ESPIPE (-4041)
    351      1.1  christos #endif
    352      1.1  christos 
    353      1.1  christos #if defined(ESRCH) && !defined(_WIN32)
    354      1.1  christos # define UV__ESRCH UV__ERR(ESRCH)
    355      1.1  christos #else
    356      1.1  christos # define UV__ESRCH (-4040)
    357      1.1  christos #endif
    358      1.1  christos 
    359      1.1  christos #if defined(ETIMEDOUT) && !defined(_WIN32)
    360      1.1  christos # define UV__ETIMEDOUT UV__ERR(ETIMEDOUT)
    361      1.1  christos #else
    362      1.1  christos # define UV__ETIMEDOUT (-4039)
    363      1.1  christos #endif
    364      1.1  christos 
    365      1.1  christos #if defined(ETXTBSY) && !defined(_WIN32)
    366      1.1  christos # define UV__ETXTBSY UV__ERR(ETXTBSY)
    367      1.1  christos #else
    368      1.1  christos # define UV__ETXTBSY (-4038)
    369      1.1  christos #endif
    370      1.1  christos 
    371      1.1  christos #if defined(EXDEV) && !defined(_WIN32)
    372      1.1  christos # define UV__EXDEV UV__ERR(EXDEV)
    373      1.1  christos #else
    374      1.1  christos # define UV__EXDEV (-4037)
    375      1.1  christos #endif
    376      1.1  christos 
    377      1.1  christos #if defined(EFBIG) && !defined(_WIN32)
    378      1.1  christos # define UV__EFBIG UV__ERR(EFBIG)
    379      1.1  christos #else
    380      1.1  christos # define UV__EFBIG (-4036)
    381      1.1  christos #endif
    382      1.1  christos 
    383      1.1  christos #if defined(ENOPROTOOPT) && !defined(_WIN32)
    384      1.1  christos # define UV__ENOPROTOOPT UV__ERR(ENOPROTOOPT)
    385      1.1  christos #else
    386      1.1  christos # define UV__ENOPROTOOPT (-4035)
    387      1.1  christos #endif
    388      1.1  christos 
    389      1.1  christos #if defined(ERANGE) && !defined(_WIN32)
    390      1.1  christos # define UV__ERANGE UV__ERR(ERANGE)
    391      1.1  christos #else
    392      1.1  christos # define UV__ERANGE (-4034)
    393      1.1  christos #endif
    394      1.1  christos 
    395      1.1  christos #if defined(ENXIO) && !defined(_WIN32)
    396      1.1  christos # define UV__ENXIO UV__ERR(ENXIO)
    397      1.1  christos #else
    398      1.1  christos # define UV__ENXIO (-4033)
    399      1.1  christos #endif
    400      1.1  christos 
    401      1.1  christos #if defined(EMLINK) && !defined(_WIN32)
    402      1.1  christos # define UV__EMLINK UV__ERR(EMLINK)
    403      1.1  christos #else
    404      1.1  christos # define UV__EMLINK (-4032)
    405      1.1  christos #endif
    406      1.1  christos 
    407      1.1  christos /* EHOSTDOWN is not visible on BSD-like systems when _POSIX_C_SOURCE is
    408      1.1  christos  * defined. Fortunately, its value is always 64 so it's possible albeit
    409      1.1  christos  * icky to hard-code it.
    410      1.1  christos  */
    411      1.1  christos #if defined(EHOSTDOWN) && !defined(_WIN32)
    412      1.1  christos # define UV__EHOSTDOWN UV__ERR(EHOSTDOWN)
    413      1.1  christos #elif defined(__APPLE__) || \
    414      1.1  christos       defined(__DragonFly__) || \
    415      1.1  christos       defined(__FreeBSD__) || \
    416      1.1  christos       defined(__NetBSD__) || \
    417      1.1  christos       defined(__OpenBSD__)
    418      1.1  christos # define UV__EHOSTDOWN (-64)
    419      1.1  christos #else
    420      1.1  christos # define UV__EHOSTDOWN (-4031)
    421      1.1  christos #endif
    422      1.1  christos 
    423      1.1  christos #if defined(EREMOTEIO) && !defined(_WIN32)
    424      1.1  christos # define UV__EREMOTEIO UV__ERR(EREMOTEIO)
    425      1.1  christos #else
    426      1.1  christos # define UV__EREMOTEIO (-4030)
    427      1.1  christos #endif
    428      1.1  christos 
    429      1.1  christos #if defined(ENOTTY) && !defined(_WIN32)
    430      1.1  christos # define UV__ENOTTY UV__ERR(ENOTTY)
    431      1.1  christos #else
    432      1.1  christos # define UV__ENOTTY (-4029)
    433      1.1  christos #endif
    434      1.1  christos 
    435      1.1  christos #if defined(EFTYPE) && !defined(_WIN32)
    436      1.1  christos # define UV__EFTYPE UV__ERR(EFTYPE)
    437      1.1  christos #else
    438      1.1  christos # define UV__EFTYPE (-4028)
    439      1.1  christos #endif
    440      1.1  christos 
    441      1.1  christos #if defined(EILSEQ) && !defined(_WIN32)
    442      1.1  christos # define UV__EILSEQ UV__ERR(EILSEQ)
    443      1.1  christos #else
    444      1.1  christos # define UV__EILSEQ (-4027)
    445      1.1  christos #endif
    446      1.1  christos 
    447  1.1.1.2  christos #if defined(EOVERFLOW) && !defined(_WIN32)
    448  1.1.1.2  christos # define UV__EOVERFLOW UV__ERR(EOVERFLOW)
    449  1.1.1.2  christos #else
    450  1.1.1.2  christos # define UV__EOVERFLOW (-4026)
    451  1.1.1.2  christos #endif
    452  1.1.1.2  christos 
    453  1.1.1.2  christos #if defined(ESOCKTNOSUPPORT) && !defined(_WIN32)
    454  1.1.1.2  christos # define UV__ESOCKTNOSUPPORT UV__ERR(ESOCKTNOSUPPORT)
    455  1.1.1.2  christos #else
    456  1.1.1.2  christos # define UV__ESOCKTNOSUPPORT (-4025)
    457  1.1.1.2  christos #endif
    458  1.1.1.2  christos 
    459  1.1.1.3  christos /* FreeBSD defines ENODATA in /usr/include/c++/v1/errno.h which is only visible
    460  1.1.1.3  christos  * if C++ is being used. Define it directly to avoid problems when integrating
    461  1.1.1.3  christos  * libuv in a C++ project.
    462  1.1.1.3  christos  */
    463  1.1.1.3  christos #if defined(ENODATA) && !defined(_WIN32)
    464  1.1.1.3  christos # define UV__ENODATA UV__ERR(ENODATA)
    465  1.1.1.3  christos #elif defined(__FreeBSD__)
    466  1.1.1.3  christos # define UV__ENODATA (-9919)
    467  1.1.1.3  christos #else
    468  1.1.1.3  christos # define UV__ENODATA (-4024)
    469  1.1.1.3  christos #endif
    470  1.1.1.3  christos 
    471  1.1.1.3  christos #if defined(EUNATCH) && !defined(_WIN32)
    472  1.1.1.3  christos # define UV__EUNATCH UV__ERR(EUNATCH)
    473  1.1.1.3  christos #else
    474  1.1.1.3  christos # define UV__EUNATCH (-4023)
    475  1.1.1.3  christos #endif
    476  1.1.1.3  christos 
    477  1.1.1.3  christos #if defined(ENOEXEC) && !defined(_WIN32)
    478  1.1.1.3  christos # define UV__ENOEXEC UV__ERR(ENOEXEC)
    479  1.1.1.3  christos #else
    480  1.1.1.3  christos # define UV__ENOEXEC (-4022)
    481  1.1.1.3  christos #endif
    482  1.1.1.3  christos 
    483      1.1  christos #endif /* UV_ERRNO_H_ */
    484