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
8 changes: 8 additions & 0 deletions libc/hdr/types/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,14 @@ add_proxy_header_library(
libc.include.llvm-libc-types.struct_tm
)

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

add_proxy_header_library(
size_t
HDRS
Expand Down
23 changes: 23 additions & 0 deletions libc/hdr/types/rsize_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//===-- Proxy for rsize_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_SIZE_T_H
#define LLVM_LIBC_HDR_TYPES_SIZE_T_H

#ifdef LIBC_FULL_BUILD

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

#else

#define __need_rsize_t
#include <stddef.h>
#undef __need_rsize_t

#endif // LIBC_FULL_BUILD

#endif // LLVM_LIBC_HDR_TYPES_SIZE_T_H
1 change: 1 addition & 0 deletions libc/include/llvm-libc-types/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
add_header(off64_t HDR off64_t.h)
add_header(rsize_t HDR rsize_t.h)
add_header(size_t HDR size_t.h)
add_header(ssize_t HDR ssize_t.h)
add_header(__atfork_callback_t HDR __atfork_callback_t.h)
Expand Down
18 changes: 18 additions & 0 deletions libc/include/llvm-libc-types/rsize_t.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//===-- Definition of size_t types ----------------------------------------===//
//
// 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_TYPES_RSIZE_T_H
#define LLVM_LIBC_TYPES_RSIZE_T_H

#ifdef LIBC_HAS_ANNEX_K

typedef __SIZE_TYPE__ rsize_t;

#endif // LIBC_HAS_ANNEX_K

#endif // LLVM_LIBC_TYPES_RSIZE_T_H
Loading