Howard Hinnant | 3e51952 | 2010-05-11 19:42:16 +0000 | [diff] [blame^] | 1 | // -*- C++ -*- |
| 2 | //===-------------------------- cerrno ------------------------------------===// |
| 3 | // |
| 4 | // ÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊÊThe LLVM Compiler Infrastructure |
| 5 | // |
| 6 | // This file is distributed under the University of Illinois Open Source |
| 7 | // License. See LICENSE.TXT for details. |
| 8 | // |
| 9 | //===----------------------------------------------------------------------===// |
| 10 | |
| 11 | #ifndef _LIBCPP_CERRNO |
| 12 | #define _LIBCPP_CERRNO |
| 13 | |
| 14 | /* |
| 15 | cerrno synopsis |
| 16 | |
| 17 | Macros: |
| 18 | |
| 19 | EDOM |
| 20 | EILSEQ // C99 |
| 21 | ERANGE |
| 22 | errno |
| 23 | |
| 24 | */ |
| 25 | |
| 26 | #include <__config> |
| 27 | #include <errno.h> |
| 28 | |
| 29 | #pragma GCC system_header |
| 30 | |
| 31 | #if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE) |
| 32 | |
| 33 | const int __elast1 = ELAST+1; |
| 34 | const int __elast2 = ELAST+2; |
| 35 | #undef ELAST |
| 36 | |
| 37 | #ifdef ENOTRECOVERABLE |
| 38 | |
| 39 | #define EOWNERDEAD __elast1 |
| 40 | #define ELAST EOWNERDEAD |
| 41 | |
| 42 | #elif defined(EOWNERDEAD) |
| 43 | |
| 44 | #define ENOTRECOVERABLE __elast1 |
| 45 | #define ELAST ENOTRECOVERABLE |
| 46 | |
| 47 | #else |
| 48 | |
| 49 | #define EOWNERDEAD __elast1 |
| 50 | #define ENOTRECOVERABLE __elast2 |
| 51 | #define ELAST ENOTRECOVERABLE |
| 52 | |
| 53 | #endif |
| 54 | |
| 55 | #endif |
| 56 | |
| 57 | #endif // _LIBCPP_CERRNO |