[LICM] allow MemoryAccess creation failure (#116813)
[llvm-project.git] / libc / include / errno.h.def
blobaa1f6c9e484444eb8df81b782e2c849300cc2975
1 //===-- C standard library header errno.h ---------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_LIBC_ERRNO_H
10 #define LLVM_LIBC_ERRNO_H
12 #include "__llvm-libc-common.h"
14 #ifdef __linux__
16 #include <linux/errno.h>
18 #ifndef ENOTSUP
19 #define ENOTSUP EOPNOTSUPP
20 #endif // ENOTSUP
22 #include "llvm-libc-macros/linux/error-number-macros.h"
24 #else // __linux__
25 #include "llvm-libc-macros/generic-error-number-macros.h"
26 #endif
28 __BEGIN_C_DECLS
30 int *__llvm_libc_errno(void) __NOEXCEPT;
32 __END_C_DECLS
34 #define errno (*__llvm_libc_errno())
36 #endif // LLVM_LIBC_ERRNO_H