mirror of
https://github.com/darlinghq/darling-libcxx.git
synced 2024-11-27 13:50:23 +00:00
8c1aa2c24d
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@129255 91177308-0d34-0410-b5e6-96231b3b80d8
76 lines
1.3 KiB
C++
76 lines
1.3 KiB
C++
// -*- 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
|