llvm-project/libc/include/errno.h.def
Shreeyash Pandey 2a5420ea51
[libc] move abs_timesout and monotonicity out of linux dir (#167719)
This patch moves abs_timeout and monotonicity out of the linux dir into
common. Both of these functions depend on clock_gettime which is the
actual os-dependent component. As other features in `__support/threads`
may want to use these, it's better to share it in common.
2025-12-08 22:14:12 +05:30

43 lines
896 B
Modula-2

//===-- C standard library header errno.h ---------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_LIBC_ERRNO_H
#define LLVM_LIBC_ERRNO_H
#include "__llvm-libc-common.h"
#ifdef __linux__
#include <linux/errno.h>
#ifndef ENOTSUP
#define ENOTSUP EOPNOTSUPP
#endif // ENOTSUP
#include "llvm-libc-macros/linux/error-number-macros.h"
#elif defined(__APPLE__)
#include <sys/errno.h>
#else // __APPLE__
#include "llvm-libc-macros/generic-error-number-macros.h"
#endif
__BEGIN_C_DECLS
int *__llvm_libc_errno(void) __NOEXCEPT;
__END_C_DECLS
#define errno (*__llvm_libc_errno())
#endif // LLVM_LIBC_ERRNO_H