blob: 9d6a76b0c004e70f448bd43bd644252130aa9860 [file] [log] [blame]
Dan Albert656850f2015-01-06 17:34:51 +00001//===----------------------- 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 Bastiena0ac1772015-02-24 01:59:38 +000033#warning ELAST for this platform not yet implemented
Dan Albert656850f2015-01-06 17:34:51 +000034#endif
35
36#endif // _LIBCPP_CONFIG_ELAST