Path: blob/main/contrib/llvm-project/libcxx/src/include/config_elast.h
35230 views
//===----------------------------------------------------------------------===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//78#ifndef _LIBCPP_CONFIG_ELAST9#define _LIBCPP_CONFIG_ELAST1011#include <__config>1213#if defined(_LIBCPP_MSVCRT_LIKE)14# include <stdlib.h>15#else16# include <errno.h>17#endif1819// Note: _LIBCPP_ELAST needs to be defined only on platforms20// where strerror/strerror_r can't handle out-of-range errno values.21#if defined(ELAST)22# define _LIBCPP_ELAST ELAST23#elif defined(_NEWLIB_VERSION)24# define _LIBCPP_ELAST __ELASTERROR25#elif defined(__NuttX__)26// No _LIBCPP_ELAST needed on NuttX27#elif defined(__Fuchsia__)28// No _LIBCPP_ELAST needed on Fuchsia29#elif defined(__wasi__)30// No _LIBCPP_ELAST needed on WASI31#elif defined(__EMSCRIPTEN__)32// No _LIBCPP_ELAST needed on Emscripten33#elif defined(__linux__) || defined(_LIBCPP_HAS_MUSL_LIBC)34# define _LIBCPP_ELAST 409535#elif defined(__APPLE__)36// No _LIBCPP_ELAST needed on Apple37#elif defined(__MVS__)38# define _LIBCPP_ELAST 116039#elif defined(_LIBCPP_MSVCRT_LIKE)40# define _LIBCPP_ELAST (_sys_nerr - 1)41#elif defined(_AIX)42# define _LIBCPP_ELAST 12743#else44// Warn here so that the person doing the libcxx port has an easier time:45# warning ELAST for this platform not yet implemented46#endif4748#endif // _LIBCPP_CONFIG_ELAST495051