summaryrefslogtreecommitdiffstats
path: root/libcxx/include/cerrno
blob: e8c2e578e979dd2a0dadca933f579ad0bc0cb06a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
// -*- C++ -*-
//===-------------------------- cerrno ------------------------------------===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is dual licensed under the MIT and the University of Illinois Open
// Source Licenses. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP_CERRNO
#define _LIBCPP_CERRNO

/*
    cerrno synopsis

Macros:

    EDOM
    EILSEQ  // C99
    ERANGE
    errno

*/

#include <__config>
#include <errno.h>

#pragma GCC system_header

#if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)

#ifdef ELAST

const int __elast1 = ELAST+1;
const int __elast2 = ELAST+2;

#else

const int __elast1 = 104;
const int __elast2 = 105;

#endif

#ifdef ENOTRECOVERABLE

#define EOWNERDEAD __elast1

#ifdef ELAST
#undef ELAST
#define ELAST EOWNERDEAD
#endif

#elif defined(EOWNERDEAD)

#define ENOTRECOVERABLE __elast1
#ifdef ELAST
#undef ELAST
#define ELAST ENOTRECOVERABLE
#endif

#else  // defined(EOWNERDEAD)

#define EOWNERDEAD __elast1
#define ENOTRECOVERABLE __elast2
#ifdef ELAST
#undef ELAST
#define ELAST ENOTRECOVERABLE
#endif

#endif  // defined(EOWNERDEAD)

#endif  // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)

#endif  // _LIBCPP_CERRNO
OpenPOWER on IntegriCloud