diff --git a/contrib/llvm-project/libcxx/include/__errc b/contrib/llvm-project/libcxx/include/__errc index a8ad29f364ac..1b5b43391815 100644 --- a/contrib/llvm-project/libcxx/include/__errc +++ b/contrib/llvm-project/libcxx/include/__errc @@ -1,217 +1,219 @@ // -*- C++ -*- //===---------------------------- __errc ----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP___ERRC #define _LIBCPP___ERRC /* system_error synopsis namespace std { enum class errc { address_family_not_supported, // EAFNOSUPPORT address_in_use, // EADDRINUSE address_not_available, // EADDRNOTAVAIL already_connected, // EISCONN argument_list_too_long, // E2BIG argument_out_of_domain, // EDOM bad_address, // EFAULT bad_file_descriptor, // EBADF bad_message, // EBADMSG broken_pipe, // EPIPE connection_aborted, // ECONNABORTED connection_already_in_progress, // EALREADY connection_refused, // ECONNREFUSED connection_reset, // ECONNRESET cross_device_link, // EXDEV destination_address_required, // EDESTADDRREQ device_or_resource_busy, // EBUSY directory_not_empty, // ENOTEMPTY executable_format_error, // ENOEXEC file_exists, // EEXIST file_too_large, // EFBIG filename_too_long, // ENAMETOOLONG function_not_supported, // ENOSYS host_unreachable, // EHOSTUNREACH identifier_removed, // EIDRM illegal_byte_sequence, // EILSEQ inappropriate_io_control_operation, // ENOTTY + integrity_check_failed, // EINTEGRITY interrupted, // EINTR invalid_argument, // EINVAL invalid_seek, // ESPIPE io_error, // EIO is_a_directory, // EISDIR message_size, // EMSGSIZE network_down, // ENETDOWN network_reset, // ENETRESET network_unreachable, // ENETUNREACH no_buffer_space, // ENOBUFS no_child_process, // ECHILD no_link, // ENOLINK no_lock_available, // ENOLCK no_message_available, // ENODATA no_message, // ENOMSG no_protocol_option, // ENOPROTOOPT no_space_on_device, // ENOSPC no_stream_resources, // ENOSR no_such_device_or_address, // ENXIO no_such_device, // ENODEV no_such_file_or_directory, // ENOENT no_such_process, // ESRCH not_a_directory, // ENOTDIR not_a_socket, // ENOTSOCK not_a_stream, // ENOSTR not_connected, // ENOTCONN not_enough_memory, // ENOMEM not_supported, // ENOTSUP operation_canceled, // ECANCELED operation_in_progress, // EINPROGRESS operation_not_permitted, // EPERM operation_not_supported, // EOPNOTSUPP operation_would_block, // EWOULDBLOCK owner_dead, // EOWNERDEAD permission_denied, // EACCES protocol_error, // EPROTO protocol_not_supported, // EPROTONOSUPPORT read_only_file_system, // EROFS resource_deadlock_would_occur, // EDEADLK resource_unavailable_try_again, // EAGAIN result_out_of_range, // ERANGE state_not_recoverable, // ENOTRECOVERABLE stream_timeout, // ETIME text_file_busy, // ETXTBSY timed_out, // ETIMEDOUT too_many_files_open_in_system, // ENFILE too_many_files_open, // EMFILE too_many_links, // EMLINK too_many_symbolic_link_levels, // ELOOP value_too_large, // EOVERFLOW wrong_protocol_type // EPROTOTYPE }; */ #include <__config> #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif _LIBCPP_BEGIN_NAMESPACE_STD // Some error codes are not present on all platforms, so we provide equivalents // for them: //enum class errc _LIBCPP_DECLARE_STRONG_ENUM(errc) { address_family_not_supported = EAFNOSUPPORT, address_in_use = EADDRINUSE, address_not_available = EADDRNOTAVAIL, already_connected = EISCONN, argument_list_too_long = E2BIG, argument_out_of_domain = EDOM, bad_address = EFAULT, bad_file_descriptor = EBADF, bad_message = EBADMSG, broken_pipe = EPIPE, connection_aborted = ECONNABORTED, connection_already_in_progress = EALREADY, connection_refused = ECONNREFUSED, connection_reset = ECONNRESET, cross_device_link = EXDEV, destination_address_required = EDESTADDRREQ, device_or_resource_busy = EBUSY, directory_not_empty = ENOTEMPTY, executable_format_error = ENOEXEC, file_exists = EEXIST, file_too_large = EFBIG, filename_too_long = ENAMETOOLONG, function_not_supported = ENOSYS, host_unreachable = EHOSTUNREACH, identifier_removed = EIDRM, illegal_byte_sequence = EILSEQ, inappropriate_io_control_operation = ENOTTY, + integrity_check_failed = EINTEGRITY, interrupted = EINTR, invalid_argument = EINVAL, invalid_seek = ESPIPE, io_error = EIO, is_a_directory = EISDIR, message_size = EMSGSIZE, network_down = ENETDOWN, network_reset = ENETRESET, network_unreachable = ENETUNREACH, no_buffer_space = ENOBUFS, no_child_process = ECHILD, no_link = ENOLINK, no_lock_available = ENOLCK, #ifdef ENODATA no_message_available = ENODATA, #else no_message_available = ENOMSG, #endif no_message = ENOMSG, no_protocol_option = ENOPROTOOPT, no_space_on_device = ENOSPC, #ifdef ENOSR no_stream_resources = ENOSR, #else no_stream_resources = ENOMEM, #endif no_such_device_or_address = ENXIO, no_such_device = ENODEV, no_such_file_or_directory = ENOENT, no_such_process = ESRCH, not_a_directory = ENOTDIR, not_a_socket = ENOTSOCK, #ifdef ENOSTR not_a_stream = ENOSTR, #else not_a_stream = EINVAL, #endif not_connected = ENOTCONN, not_enough_memory = ENOMEM, not_supported = ENOTSUP, operation_canceled = ECANCELED, operation_in_progress = EINPROGRESS, operation_not_permitted = EPERM, operation_not_supported = EOPNOTSUPP, operation_would_block = EWOULDBLOCK, owner_dead = EOWNERDEAD, permission_denied = EACCES, protocol_error = EPROTO, protocol_not_supported = EPROTONOSUPPORT, read_only_file_system = EROFS, resource_deadlock_would_occur = EDEADLK, resource_unavailable_try_again = EAGAIN, result_out_of_range = ERANGE, state_not_recoverable = ENOTRECOVERABLE, #ifdef ETIME stream_timeout = ETIME, #else stream_timeout = ETIMEDOUT, #endif text_file_busy = ETXTBSY, timed_out = ETIMEDOUT, too_many_files_open_in_system = ENFILE, too_many_files_open = EMFILE, too_many_links = EMLINK, too_many_symbolic_link_levels = ELOOP, value_too_large = EOVERFLOW, wrong_protocol_type = EPROTOTYPE }; _LIBCPP_DECLARE_STRONG_ENUM_EPILOG(errc) _LIBCPP_END_NAMESPACE_STD #endif // _LIBCPP___ERRC diff --git a/contrib/llvm-project/libcxx/include/errno.h b/contrib/llvm-project/libcxx/include/errno.h index 447319effd35..f2d13b9a9904 100644 --- a/contrib/llvm-project/libcxx/include/errno.h +++ b/contrib/llvm-project/libcxx/include/errno.h @@ -1,397 +1,431 @@ // -*- C++ -*- //===-------------------------- errno.h -----------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _LIBCPP_ERRNO_H #define _LIBCPP_ERRNO_H /* errno.h synopsis Macros: EDOM EILSEQ // C99 ERANGE errno */ #include <__config> #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) #pragma GCC system_header #endif #include_next #ifdef __cplusplus -#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) || !defined(EINTEGRITY) -#ifdef ELAST +#if defined(ELAST) static const int __elast1 = ELAST+1; static const int __elast2 = ELAST+2; +static const int __elast3 = ELAST+3; #else static const int __elast1 = 104; static const int __elast2 = 105; +static const int __elast3 = 106; #endif -#ifdef ENOTRECOVERABLE +#if !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#define EINTEGRITY __elast3 +#if defined(ELAST) +#undef ELAST +#define ELAST EINTEGRITY +#endif + +#elif !defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EOWNERDEAD __elast2 +#if defined(ELAST) +#undef ELAST +#define ELAST EOWNERDEAD +#endif +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) #define EOWNERDEAD __elast1 +#define EINTEGRITY __elast2 +#if defined(ELAST) +#undef ELAST +#define ELAST EINTEGRITY +#endif -#ifdef ELAST +#elif !defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && defined(EINTEGRITY) +#define EOWNERDEAD __elast1 +#if defined(ELAST) #undef ELAST #define ELAST EOWNERDEAD #endif -#elif defined(EOWNERDEAD) +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define ENOTRECOVERABLE __elast1 +#define EINTEGRITY __elast2 +#if defined(ELAST) +#undef ELAST +#define ELAST EINTEGRITY +#endif +#elif defined(EOWNERDEAD) && !defined(ENOTRECOVERABLE) && defined(EINTEGRITY) #define ENOTRECOVERABLE __elast1 -#ifdef ELAST +#if defined(ELAST) #undef ELAST #define ELAST ENOTRECOVERABLE #endif -#else // defined(EOWNERDEAD) - -#define EOWNERDEAD __elast1 -#define ENOTRECOVERABLE __elast2 -#ifdef ELAST +#elif defined(EOWNERDEAD) && defined(ENOTRECOVERABLE) && !defined(EINTEGRITY) +#define EINTEGRITY __elast1 +#if defined(ELAST) #undef ELAST -#define ELAST ENOTRECOVERABLE +#define ELAST EINTEGRITY #endif -#endif // defined(EOWNERDEAD) +#endif // !defined(OWNERDEAD) && !defined(NOTRECOVERABLE) && !defined(INTEGRITY) -#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) +#endif // !defined(OWNERDEAD) || !defined(NOTRECOVERABLE) || !defined(INTEGRITY) // supply errno values likely to be missing, particularly on Windows #ifndef EAFNOSUPPORT #define EAFNOSUPPORT 9901 #endif #ifndef EADDRINUSE #define EADDRINUSE 9902 #endif #ifndef EADDRNOTAVAIL #define EADDRNOTAVAIL 9903 #endif #ifndef EISCONN #define EISCONN 9904 #endif #ifndef EBADMSG #define EBADMSG 9905 #endif #ifndef ECONNABORTED #define ECONNABORTED 9906 #endif #ifndef EALREADY #define EALREADY 9907 #endif #ifndef ECONNREFUSED #define ECONNREFUSED 9908 #endif #ifndef ECONNRESET #define ECONNRESET 9909 #endif #ifndef EDESTADDRREQ #define EDESTADDRREQ 9910 #endif #ifndef EHOSTUNREACH #define EHOSTUNREACH 9911 #endif #ifndef EIDRM #define EIDRM 9912 #endif #ifndef EMSGSIZE #define EMSGSIZE 9913 #endif #ifndef ENETDOWN #define ENETDOWN 9914 #endif #ifndef ENETRESET #define ENETRESET 9915 #endif #ifndef ENETUNREACH #define ENETUNREACH 9916 #endif #ifndef ENOBUFS #define ENOBUFS 9917 #endif #ifndef ENOLINK #define ENOLINK 9918 #endif #ifndef ENODATA #define ENODATA 9919 #endif #ifndef ENOMSG #define ENOMSG 9920 #endif #ifndef ENOPROTOOPT #define ENOPROTOOPT 9921 #endif #ifndef ENOSR #define ENOSR 9922 #endif #ifndef ENOTSOCK #define ENOTSOCK 9923 #endif #ifndef ENOSTR #define ENOSTR 9924 #endif #ifndef ENOTCONN #define ENOTCONN 9925 #endif #ifndef ENOTSUP #define ENOTSUP 9926 #endif #ifndef ECANCELED #define ECANCELED 9927 #endif #ifndef EINPROGRESS #define EINPROGRESS 9928 #endif #ifndef EOPNOTSUPP #define EOPNOTSUPP 9929 #endif #ifndef EWOULDBLOCK #define EWOULDBLOCK 9930 #endif #ifndef EOWNERDEAD #define EOWNERDEAD 9931 #endif #ifndef EPROTO #define EPROTO 9932 #endif #ifndef EPROTONOSUPPORT #define EPROTONOSUPPORT 9933 #endif #ifndef ENOTRECOVERABLE #define ENOTRECOVERABLE 9934 #endif #ifndef ETIME #define ETIME 9935 #endif #ifndef ETXTBSY #define ETXTBSY 9936 #endif #ifndef ETIMEDOUT #define ETIMEDOUT 9938 #endif #ifndef ELOOP #define ELOOP 9939 #endif #ifndef EOVERFLOW #define EOVERFLOW 9940 #endif #ifndef EPROTOTYPE #define EPROTOTYPE 9941 #endif #ifndef ENOSYS #define ENOSYS 9942 #endif #ifndef EINVAL #define EINVAL 9943 #endif #ifndef ERANGE #define ERANGE 9944 #endif #ifndef EILSEQ #define EILSEQ 9945 #endif // Windows Mobile doesn't appear to define these: #ifndef E2BIG #define E2BIG 9946 #endif #ifndef EDOM #define EDOM 9947 #endif #ifndef EFAULT #define EFAULT 9948 #endif #ifndef EBADF #define EBADF 9949 #endif #ifndef EPIPE #define EPIPE 9950 #endif #ifndef EXDEV #define EXDEV 9951 #endif #ifndef EBUSY #define EBUSY 9952 #endif #ifndef ENOTEMPTY #define ENOTEMPTY 9953 #endif #ifndef ENOEXEC #define ENOEXEC 9954 #endif #ifndef EEXIST #define EEXIST 9955 #endif #ifndef EFBIG #define EFBIG 9956 #endif #ifndef ENAMETOOLONG #define ENAMETOOLONG 9957 #endif #ifndef ENOTTY #define ENOTTY 9958 #endif #ifndef EINTR #define EINTR 9959 #endif #ifndef ESPIPE #define ESPIPE 9960 #endif #ifndef EIO #define EIO 9961 #endif #ifndef EISDIR #define EISDIR 9962 #endif #ifndef ECHILD #define ECHILD 9963 #endif #ifndef ENOLCK #define ENOLCK 9964 #endif #ifndef ENOSPC #define ENOSPC 9965 #endif #ifndef ENXIO #define ENXIO 9966 #endif #ifndef ENODEV #define ENODEV 9967 #endif #ifndef ENOENT #define ENOENT 9968 #endif #ifndef ESRCH #define ESRCH 9969 #endif #ifndef ENOTDIR #define ENOTDIR 9970 #endif #ifndef ENOMEM #define ENOMEM 9971 #endif #ifndef EPERM #define EPERM 9972 #endif #ifndef EACCES #define EACCES 9973 #endif #ifndef EROFS #define EROFS 9974 #endif #ifndef EDEADLK #define EDEADLK 9975 #endif #ifndef EAGAIN #define EAGAIN 9976 #endif #ifndef ENFILE #define ENFILE 9977 #endif #ifndef EMFILE #define EMFILE 9978 #endif #ifndef EMLINK #define EMLINK 9979 #endif +#ifndef EINTEGRITY +#define EINTEGRITY 9980 +#endif + #endif // __cplusplus #endif // _LIBCPP_ERRNO_H