1 //===----------------------- config_elast.h -------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef _LIBCPP_CONFIG_ELAST 11 #define _LIBCPP_CONFIG_ELAST 12 13 #if defined(_WIN32) 14 #include <stdlib.h> 15 #else 16 #include <errno.h> 17 #endif 18 19 #if defined(ELAST) 20 #define _LIBCPP_ELAST ELAST 21 #elif defined(_NEWLIB_VERSION) 22 #define _LIBCPP_ELAST __ELASTERROR 23 #elif defined(__Fuchsia__) 24 // No _LIBCPP_ELAST needed on Fuchsia 25 #elif defined(__linux__) 26 #define _LIBCPP_ELAST 4095 27 #elif defined(__APPLE__) 28 // No _LIBCPP_ELAST needed on Apple 29 #elif defined(__sun__) 30 #define _LIBCPP_ELAST ESTALE 31 #elif defined(_WIN32) 32 #define _LIBCPP_ELAST _sys_nerr 33 #else 34 // Warn here so that the person doing the libcxx port has an easier time: 35 #warning ELAST for this platform not yet implemented 36 #endif 37 38 #endif // _LIBCPP_CONFIG_ELAST 39