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