brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · be665a9 Raw
52 lines · c
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef _LIBCPP_CONFIG_ELAST10#define _LIBCPP_CONFIG_ELAST11 12#include <__config>13 14#if defined(_LIBCPP_MSVCRT_LIKE)15#  include <stdlib.h>16#else17#  include <errno.h>18#endif19 20// Note: _LIBCPP_ELAST needs to be defined only on platforms21// where strerror/strerror_r can't handle out-of-range errno values.22#if defined(ELAST)23#  define _LIBCPP_ELAST ELAST24#elif defined(__LLVM_LIBC__)25// No _LIBCPP_ELAST needed for LLVM libc26#elif _LIBCPP_LIBC_NEWLIB27#  define _LIBCPP_ELAST __ELASTERROR28#elif defined(__NuttX__)29// No _LIBCPP_ELAST needed on NuttX30#elif defined(__Fuchsia__)31// No _LIBCPP_ELAST needed on Fuchsia32#elif defined(__wasi__)33// No _LIBCPP_ELAST needed on WASI34#elif defined(__EMSCRIPTEN__)35// No _LIBCPP_ELAST needed on Emscripten36#elif defined(__linux__) || _LIBCPP_HAS_MUSL_LIBC37#  define _LIBCPP_ELAST 409538#elif defined(__APPLE__)39// No _LIBCPP_ELAST needed on Apple40#elif defined(__MVS__)41#  define _LIBCPP_ELAST 116042#elif defined(_LIBCPP_MSVCRT_LIKE)43#  define _LIBCPP_ELAST (_sys_nerr - 1)44#elif defined(_AIX)45#  define _LIBCPP_ELAST 12746#else47// Warn here so that the person doing the libcxx port has an easier time:48#  warning ELAST for this platform not yet implemented49#endif50 51#endif // _LIBCPP_CONFIG_ELAST52