Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions libc/hdr/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,15 @@ add_proxy_header_library(
libc.include.fcntl
)

add_proxy_header_library(
errno_t
HDRS
errno_t.h
FULL_BUILD_DEPENDS
libc.include.llvm-libc-types.errno_t
libc.include.errno
)

add_proxy_header_library(
fenv_t
HDRS
Expand Down
18 changes: 18 additions & 0 deletions libc/hdr/types/errno_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Proxy for errno_t -------------------------------------------------===//
//
// 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_HDR_TYPES_ERRNO_T_H
#define LLVM_LIBC_HDR_TYPES_ERRNO_T_H

#define LIBC_HAS_ANNEX_K

#include "include/llvm-libc-types/errno_t.h"

#undef LIBC_HAS_ANNEX_K

#endif // LLVM_LIBC_HDR_TYPES_ERRNO_T_H
1 change: 1 addition & 0 deletions libc/include/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,7 @@ add_header_macro(
DEPENDS
.llvm-libc-macros.generic_error_number_macros
.llvm-libc-macros.error_number_macros
.llvm-libc-types.errno_t
)

add_header_macro(
Expand Down
2 changes: 2 additions & 0 deletions libc/include/errno.h.def
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,6 @@ __END_C_DECLS

#define errno (*__llvm_libc_errno())

#include "llvm-libc-types/errno_t.h"

#endif // LLVM_LIBC_ERRNO_H
1 change: 1 addition & 0 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ add_header(double_t HDR double_t.h)
add_header(DIR HDR DIR.h)
add_header(dev_t HDR dev_t.h)
add_header(div_t HDR div_t.h)
add_header(errno_t HDR errno_t.h)
add_header(ldiv_t HDR ldiv_t.h)
add_header(lldiv_t HDR lldiv_t.h)
add_header(FILE HDR FILE.h)
Expand Down
18 changes: 18 additions & 0 deletions libc/include/llvm-libc-types/errno_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Definition of type errno_t ----------------------------------------===//
//
// 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_INCLUDE_LLVM_LIBC_TYPES_ERRNO_T_H
#define LLVM_LIBC_INCLUDE_LLVM_LIBC_TYPES_ERRNO_T_H

#ifdef LIBC_HAS_ANNEX_K

typedef int errno_t;

#endif // LIBC_HAS_ANNEX_K

#endif // LLVM_LIBC_INCLUDE_LLVM_LIBC_TYPES_ERRNO_T_H
Loading