brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.9 KiB · e87ad0d Raw
404 lines · c
1// -*- C++ -*-2//===----------------------------------------------------------------------===//3//4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.5// See https://llvm.org/LICENSE.txt for license information.6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception7//8//===----------------------------------------------------------------------===//9 10#ifndef _LIBCPP_ERRNO_H11#define _LIBCPP_ERRNO_H12 13/*14    errno.h synopsis15 16Macros:17 18    EDOM19    EILSEQ  // C9920    ERANGE21    errno22 23*/24 25#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)26#  include <__cxx03/__config>27#else28#  include <__config>29#endif30 31#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)32#  pragma GCC system_header33#endif34 35#if __has_include_next(<errno.h>)36#  include_next <errno.h>37#endif38 39#ifdef __cplusplus40 41#  if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)42 43#    ifdef ELAST44 45static const int __elast1 = ELAST + 1;46static const int __elast2 = ELAST + 2;47 48#    else49 50static const int __elast1 = 104;51static const int __elast2 = 105;52 53#    endif54 55#    ifdef ENOTRECOVERABLE56 57#      define EOWNERDEAD __elast158 59#      ifdef ELAST60#        undef ELAST61#        define ELAST EOWNERDEAD62#      endif63 64#    elif defined(EOWNERDEAD)65 66#      define ENOTRECOVERABLE __elast167#      ifdef ELAST68#        undef ELAST69#        define ELAST ENOTRECOVERABLE70#      endif71 72#    else // defined(EOWNERDEAD)73 74#      define EOWNERDEAD __elast175#      define ENOTRECOVERABLE __elast276#      ifdef ELAST77#        undef ELAST78#        define ELAST ENOTRECOVERABLE79#      endif80 81#    endif // defined(EOWNERDEAD)82 83#  endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)84 85//  supply errno values likely to be missing, particularly on Windows86 87#  ifndef EAFNOSUPPORT88#    define EAFNOSUPPORT 990189#  endif90 91#  ifndef EADDRINUSE92#    define EADDRINUSE 990293#  endif94 95#  ifndef EADDRNOTAVAIL96#    define EADDRNOTAVAIL 990397#  endif98 99#  ifndef EISCONN100#    define EISCONN 9904101#  endif102 103#  ifndef EBADMSG104#    define EBADMSG 9905105#  endif106 107#  ifndef ECONNABORTED108#    define ECONNABORTED 9906109#  endif110 111#  ifndef EALREADY112#    define EALREADY 9907113#  endif114 115#  ifndef ECONNREFUSED116#    define ECONNREFUSED 9908117#  endif118 119#  ifndef ECONNRESET120#    define ECONNRESET 9909121#  endif122 123#  ifndef EDESTADDRREQ124#    define EDESTADDRREQ 9910125#  endif126 127#  ifndef EHOSTUNREACH128#    define EHOSTUNREACH 9911129#  endif130 131#  ifndef EIDRM132#    define EIDRM 9912133#  endif134 135#  ifndef EMSGSIZE136#    define EMSGSIZE 9913137#  endif138 139#  ifndef ENETDOWN140#    define ENETDOWN 9914141#  endif142 143#  ifndef ENETRESET144#    define ENETRESET 9915145#  endif146 147#  ifndef ENETUNREACH148#    define ENETUNREACH 9916149#  endif150 151#  ifndef ENOBUFS152#    define ENOBUFS 9917153#  endif154 155#  ifndef ENOLINK156#    define ENOLINK 9918157#  endif158 159#  ifndef ENODATA160#    define ENODATA 9919161#  endif162 163#  ifndef ENOMSG164#    define ENOMSG 9920165#  endif166 167#  ifndef ENOPROTOOPT168#    define ENOPROTOOPT 9921169#  endif170 171#  ifndef ENOSR172#    define ENOSR 9922173#  endif174 175#  ifndef ENOTSOCK176#    define ENOTSOCK 9923177#  endif178 179#  ifndef ENOSTR180#    define ENOSTR 9924181#  endif182 183#  ifndef ENOTCONN184#    define ENOTCONN 9925185#  endif186 187#  ifndef ENOTSUP188#    define ENOTSUP 9926189#  endif190 191#  ifndef ECANCELED192#    define ECANCELED 9927193#  endif194 195#  ifndef EINPROGRESS196#    define EINPROGRESS 9928197#  endif198 199#  ifndef EOPNOTSUPP200#    define EOPNOTSUPP 9929201#  endif202 203#  ifndef EWOULDBLOCK204#    define EWOULDBLOCK 9930205#  endif206 207#  ifndef EOWNERDEAD208#    define EOWNERDEAD 9931209#  endif210 211#  ifndef EPROTO212#    define EPROTO 9932213#  endif214 215#  ifndef EPROTONOSUPPORT216#    define EPROTONOSUPPORT 9933217#  endif218 219#  ifndef ENOTRECOVERABLE220#    define ENOTRECOVERABLE 9934221#  endif222 223#  ifndef ETIME224#    define ETIME 9935225#  endif226 227#  ifndef ETXTBSY228#    define ETXTBSY 9936229#  endif230 231#  ifndef ETIMEDOUT232#    define ETIMEDOUT 9938233#  endif234 235#  ifndef ELOOP236#    define ELOOP 9939237#  endif238 239#  ifndef EOVERFLOW240#    define EOVERFLOW 9940241#  endif242 243#  ifndef EPROTOTYPE244#    define EPROTOTYPE 9941245#  endif246 247#  ifndef ENOSYS248#    define ENOSYS 9942249#  endif250 251#  ifndef EINVAL252#    define EINVAL 9943253#  endif254 255#  ifndef ERANGE256#    define ERANGE 9944257#  endif258 259#  ifndef EILSEQ260#    define EILSEQ 9945261#  endif262 263//  Windows Mobile doesn't appear to define these:264 265#  ifndef E2BIG266#    define E2BIG 9946267#  endif268 269#  ifndef EDOM270#    define EDOM 9947271#  endif272 273#  ifndef EFAULT274#    define EFAULT 9948275#  endif276 277#  ifndef EBADF278#    define EBADF 9949279#  endif280 281#  ifndef EPIPE282#    define EPIPE 9950283#  endif284 285#  ifndef EXDEV286#    define EXDEV 9951287#  endif288 289#  ifndef EBUSY290#    define EBUSY 9952291#  endif292 293#  ifndef ENOTEMPTY294#    define ENOTEMPTY 9953295#  endif296 297#  ifndef ENOEXEC298#    define ENOEXEC 9954299#  endif300 301#  ifndef EEXIST302#    define EEXIST 9955303#  endif304 305#  ifndef EFBIG306#    define EFBIG 9956307#  endif308 309#  ifndef ENAMETOOLONG310#    define ENAMETOOLONG 9957311#  endif312 313#  ifndef ENOTTY314#    define ENOTTY 9958315#  endif316 317#  ifndef EINTR318#    define EINTR 9959319#  endif320 321#  ifndef ESPIPE322#    define ESPIPE 9960323#  endif324 325#  ifndef EIO326#    define EIO 9961327#  endif328 329#  ifndef EISDIR330#    define EISDIR 9962331#  endif332 333#  ifndef ECHILD334#    define ECHILD 9963335#  endif336 337#  ifndef ENOLCK338#    define ENOLCK 9964339#  endif340 341#  ifndef ENOSPC342#    define ENOSPC 9965343#  endif344 345#  ifndef ENXIO346#    define ENXIO 9966347#  endif348 349#  ifndef ENODEV350#    define ENODEV 9967351#  endif352 353#  ifndef ENOENT354#    define ENOENT 9968355#  endif356 357#  ifndef ESRCH358#    define ESRCH 9969359#  endif360 361#  ifndef ENOTDIR362#    define ENOTDIR 9970363#  endif364 365#  ifndef ENOMEM366#    define ENOMEM 9971367#  endif368 369#  ifndef EPERM370#    define EPERM 9972371#  endif372 373#  ifndef EACCES374#    define EACCES 9973375#  endif376 377#  ifndef EROFS378#    define EROFS 9974379#  endif380 381#  ifndef EDEADLK382#    define EDEADLK 9975383#  endif384 385#  ifndef EAGAIN386#    define EAGAIN 9976387#  endif388 389#  ifndef ENFILE390#    define ENFILE 9977391#  endif392 393#  ifndef EMFILE394#    define EMFILE 9978395#  endif396 397#  ifndef EMLINK398#    define EMLINK 9979399#  endif400 401#endif // __cplusplus402 403#endif // _LIBCPP_ERRNO_H404