xref: /freebsd/contrib/llvm-project/libcxx/include/cerrno (revision 0fca6ea1d4eea4c934cfff25ac9ee8ad6fe95583)
10b57cec5SDimitry Andric// -*- C++ -*-
2349cc55cSDimitry Andric//===----------------------------------------------------------------------===//
30b57cec5SDimitry Andric//
40b57cec5SDimitry Andric// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
50b57cec5SDimitry Andric// See https://llvm.org/LICENSE.txt for license information.
60b57cec5SDimitry Andric// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
70b57cec5SDimitry Andric//
80b57cec5SDimitry Andric//===----------------------------------------------------------------------===//
90b57cec5SDimitry Andric
100b57cec5SDimitry Andric#ifndef _LIBCPP_CERRNO
110b57cec5SDimitry Andric#define _LIBCPP_CERRNO
120b57cec5SDimitry Andric
130b57cec5SDimitry Andric/*
140b57cec5SDimitry Andric    cerrno synopsis
150b57cec5SDimitry Andric
160b57cec5SDimitry AndricMacros:
170b57cec5SDimitry Andric
180b57cec5SDimitry Andric    EDOM
190b57cec5SDimitry Andric    EILSEQ  // C99
200b57cec5SDimitry Andric    ERANGE
210b57cec5SDimitry Andric    errno
220b57cec5SDimitry Andric
230b57cec5SDimitry Andric*/
240b57cec5SDimitry Andric
250b57cec5SDimitry Andric#include <__config>
26bdd1243dSDimitry Andric
270b57cec5SDimitry Andric#include <errno.h>
280b57cec5SDimitry Andric
29bdd1243dSDimitry Andric#ifndef _LIBCPP_ERRNO_H
30bdd1243dSDimitry Andric#   error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
31bdd1243dSDimitry Andric          This usually means that your header search paths are not configured properly. \
32bdd1243dSDimitry Andric          The header search paths should contain the C++ Standard Library headers before \
33bdd1243dSDimitry Andric          any C Standard Library, and you are probably using compiler flags that make that \
34bdd1243dSDimitry Andric          not be the case.
35bdd1243dSDimitry Andric#endif
36bdd1243dSDimitry Andric
370b57cec5SDimitry Andric#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
380b57cec5SDimitry Andric#  pragma GCC system_header
390b57cec5SDimitry Andric#endif
400b57cec5SDimitry Andric
41*0fca6ea1SDimitry Andric// LWG3869 Deprecate std::errc constants related to UNIX STREAMS
42*0fca6ea1SDimitry Andric//
43*0fca6ea1SDimitry Andric// This LWG issue deprecates the POSIX macros ENODATA, ENOSR, ENOSTR, and ETIME. These were
44*0fca6ea1SDimitry Andric// deprecated in libc++ in https://github.com/llvm/llvm-project/pull/80542.
45*0fca6ea1SDimitry Andric// Based on the post commit feedback the macro are no longer deprecated.
46*0fca6ea1SDimitry Andric// Instead libc++ leaves the deprecation to the provider of errno.h.
47*0fca6ea1SDimitry Andric
480b57cec5SDimitry Andric#endif // _LIBCPP_CERRNO
49