Dan Albert | 656850f | 2015-01-06 17:34:51 +0000 | [diff] [blame] | 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(__linux__) |
| 24 | #define _LIBCPP_ELAST 4095 |
| 25 | #elif defined(__APPLE__) |
| 26 | // No _LIBCPP_ELAST needed on Apple |
| 27 | #elif defined(__sun__) |
| 28 | #define _LIBCPP_ELAST ESTALE |
| 29 | #elif defined(_WIN32) |
| 30 | #define _LIBCPP_ELAST _sys_nerr |
| 31 | #else |
| 32 | // Warn here so that the person doing the libcxx port has an easier time: |
JF Bastien | a0ac177 | 2015-02-24 01:59:38 +0000 | [diff] [blame] | 33 | #warning ELAST for this platform not yet implemented |
Dan Albert | 656850f | 2015-01-06 17:34:51 +0000 | [diff] [blame] | 34 | #endif |
| 35 | |
| 36 | #endif // _LIBCPP_CONFIG_ELAST |