2010-05-12 03:42:16 +08:00
|
|
|
// -*- C++ -*-
|
|
|
|
//===-------------------------- cerrno ------------------------------------===//
|
|
|
|
//
|
2010-05-12 05:36:01 +08:00
|
|
|
// The LLVM Compiler Infrastructure
|
2010-05-12 03:42:16 +08:00
|
|
|
//
|
2010-11-17 06:09:02 +08:00
|
|
|
// This file is dual licensed under the MIT and the University of Illinois Open
|
|
|
|
// Source Licenses. See LICENSE.TXT for details.
|
2010-05-12 03:42:16 +08:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#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)
|
|
|
|
|
2011-04-11 03:46:55 +08:00
|
|
|
#ifdef ELAST
|
|
|
|
|
2010-05-12 03:42:16 +08:00
|
|
|
const int __elast1 = ELAST+1;
|
|
|
|
const int __elast2 = ELAST+2;
|
2011-04-11 03:46:55 +08:00
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
const int __elast1 = 104;
|
|
|
|
const int __elast2 = 105;
|
|
|
|
|
|
|
|
#endif
|
2010-05-12 03:42:16 +08:00
|
|
|
|
|
|
|
#ifdef ENOTRECOVERABLE
|
|
|
|
|
|
|
|
#define EOWNERDEAD __elast1
|
2011-04-11 03:46:55 +08:00
|
|
|
|
|
|
|
#ifdef ELAST
|
|
|
|
#undef ELAST
|
2010-05-12 03:42:16 +08:00
|
|
|
#define ELAST EOWNERDEAD
|
2011-04-11 03:46:55 +08:00
|
|
|
#endif
|
2010-05-12 03:42:16 +08:00
|
|
|
|
|
|
|
#elif defined(EOWNERDEAD)
|
|
|
|
|
|
|
|
#define ENOTRECOVERABLE __elast1
|
2011-04-11 03:46:55 +08:00
|
|
|
#ifdef ELAST
|
|
|
|
#undef ELAST
|
2010-05-12 03:42:16 +08:00
|
|
|
#define ELAST ENOTRECOVERABLE
|
2011-04-11 03:46:55 +08:00
|
|
|
#endif
|
2010-05-12 03:42:16 +08:00
|
|
|
|
2010-08-22 08:02:43 +08:00
|
|
|
#else // defined(EOWNERDEAD)
|
2010-05-12 03:42:16 +08:00
|
|
|
|
|
|
|
#define EOWNERDEAD __elast1
|
|
|
|
#define ENOTRECOVERABLE __elast2
|
2011-04-11 03:46:55 +08:00
|
|
|
#ifdef ELAST
|
|
|
|
#undef ELAST
|
2010-05-12 03:42:16 +08:00
|
|
|
#define ELAST ENOTRECOVERABLE
|
2011-04-11 03:46:55 +08:00
|
|
|
#endif
|
2010-05-12 03:42:16 +08:00
|
|
|
|
2010-08-22 08:02:43 +08:00
|
|
|
#endif // defined(EOWNERDEAD)
|
2010-05-12 03:42:16 +08:00
|
|
|
|
2010-08-22 08:02:43 +08:00
|
|
|
#endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
|
2010-05-12 03:42:16 +08:00
|
|
|
|
|
|
|
#endif // _LIBCPP_CERRNO
|