mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-18 12:16:49 +00:00
[libc] remove #include <fcntl.h> and add proxy or type (#113836)
This commit is contained in:
parent
481bce018e
commit
abc49cc194
@ -51,10 +51,13 @@ add_proxy_header_library(
|
||||
libc.include.llvm-libc-macros.generic_error_number_macros
|
||||
)
|
||||
|
||||
add_header_library(fcntl_overlay HDRS fcntl_overlay.h)
|
||||
add_proxy_header_library(
|
||||
fcntl_macros
|
||||
HDRS
|
||||
fcntl_macros.h
|
||||
DEPENDS
|
||||
.fcntl_overlay
|
||||
FULL_BUILD_DEPENDS
|
||||
libc.include.llvm-libc-macros.fcntl_macros
|
||||
libc.include.fcntl
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#else // Overlay mode
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_overlay.h"
|
||||
|
||||
#endif // LLVM_LIBC_FULL_BUILD
|
||||
|
||||
|
37
libc/hdr/fcntl_overlay.h
Normal file
37
libc/hdr/fcntl_overlay.h
Normal file
@ -0,0 +1,37 @@
|
||||
//===-- Including fcntl.h in overlay mode ---------------------------------===//
|
||||
//
|
||||
// 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_FCNTL_OVERLAY_H
|
||||
#define LLVM_LIBC_HDR_FCNTL_OVERLAY_H
|
||||
|
||||
#ifdef LIBC_FULL_BUILD
|
||||
#error "This header should only be included in overlay mode"
|
||||
#endif
|
||||
|
||||
// Overlay mode
|
||||
|
||||
// glibc <fcntl.h> header might provide extern inline definitions for few
|
||||
// functions, causing external alias errors. They are guarded by
|
||||
// `__USE_FORTIFY_LEVEL`, which will be temporarily disabled
|
||||
// with `_FORTIFY_SOURCE`.
|
||||
|
||||
#ifdef __USE_FORTIFY_LEVEL
|
||||
#define LIBC_OLD_USE_FORTIFY_LEVEL __USE_FORTIFY_LEVEL
|
||||
#undef __USE_FORTIFY_LEVEL
|
||||
#define __USE_FORTIFY_LEVEL 0
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
#undef __USE_FORTIFY_LEVEL
|
||||
#define __USE_FORTIFY_LEVEL LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
#undef LIBC_OLD_USE_FORTIFY_LEVEL
|
||||
#endif
|
||||
|
||||
#endif // LLVM_LIBC_HDR_FCNTL_OVERLAY_H
|
@ -46,6 +46,17 @@ add_proxy_header_library(
|
||||
libc.include.llvm-libc-types.struct_timespec
|
||||
)
|
||||
|
||||
add_proxy_header_library(
|
||||
mode_t
|
||||
HDRS
|
||||
mode_t.h
|
||||
DEPENDS
|
||||
../fcntl_overlay
|
||||
FULL_BUILD_DEPENDS
|
||||
libc.include.llvm-libc-types.mode_t
|
||||
libc.include.fcntl
|
||||
)
|
||||
|
||||
add_proxy_header_library(
|
||||
fenv_t
|
||||
HDRS
|
||||
|
22
libc/hdr/types/mode_t.h
Normal file
22
libc/hdr/types/mode_t.h
Normal file
@ -0,0 +1,22 @@
|
||||
//===-- Definition of macros from mode_t.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_HDR_MODE_T_H
|
||||
#define LLVM_LIBC_HDR_MODE_T_H
|
||||
|
||||
#ifdef LIBC_FULL_BUILD
|
||||
|
||||
#include "include/llvm-libc-types/mode_t.h"
|
||||
|
||||
#else // Overlay mode
|
||||
|
||||
#include "hdr/fcntl_overlay.h"
|
||||
|
||||
#endif // LLVM_LIBC_FULL_BUILD
|
||||
|
||||
#endif // LLVM_LIBC_HDR_MODE_T_H
|
@ -7,7 +7,7 @@ add_object_library(
|
||||
file.h
|
||||
lseekImpl.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_syscall
|
||||
libc.include.sys_stat
|
||||
libc.src.__support.CPP.new
|
||||
@ -55,7 +55,7 @@ add_object_library(
|
||||
SRCS
|
||||
dir.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
libc.src.__support.error_or
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "src/__support/error_or.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
|
||||
#include <fcntl.h> // For open flags
|
||||
#include "hdr/fcntl_macros.h" // For open flags
|
||||
#include <sys/syscall.h> // For syscall numbers
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -18,7 +18,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h" // For error macros
|
||||
|
||||
#include <fcntl.h> // For mode_t and other flags to the open syscall
|
||||
#include "hdr/fcntl_macros.h" // For mode_t and other flags to the open syscall
|
||||
#include <sys/stat.h> // For S_IS*, S_IF*, and S_IR* flags.
|
||||
#include <sys/syscall.h> // For syscall numbers
|
||||
|
||||
|
@ -79,7 +79,7 @@ add_object_library(
|
||||
.futex_utils
|
||||
libc.config.app_h
|
||||
libc.include.sys_syscall
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.src.errno.errno
|
||||
libc.src.__support.CPP.atomic
|
||||
libc.src.__support.CPP.stringstream
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <arm_acle.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <linux/param.h> // For EXEC_PAGESIZE.
|
||||
#include <linux/prctl.h> // For PR_SET_NAME
|
||||
#include <linux/sched.h> // For CLONE_* flags.
|
||||
|
@ -9,8 +9,8 @@
|
||||
#ifndef LLVM_LIBC_SRC_FCNTL_CREAT_H
|
||||
#define LLVM_LIBC_SRC_FCNTL_CREAT_H
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
||||
|
@ -5,7 +5,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../creat.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.src.__support.OSUtil.osutil
|
||||
libc.src.errno.errno
|
||||
)
|
||||
@ -17,7 +17,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../fcntl.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.src.__support.OSUtil.osutil
|
||||
)
|
||||
|
||||
@ -28,7 +28,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../open.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.types.mode_t
|
||||
libc.src.__support.OSUtil.osutil
|
||||
libc.src.errno.errno
|
||||
)
|
||||
@ -40,7 +40,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../openat.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.types.mode_t
|
||||
libc.src.__support.OSUtil.osutil
|
||||
libc.src.errno.errno
|
||||
)
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/types/mode_t.h"
|
||||
#include <stdarg.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/types/mode_t.h"
|
||||
#include <stdarg.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
#ifndef LLVM_LIBC_SRC_FCNTL_OPEN_H
|
||||
#define LLVM_LIBC_SRC_FCNTL_OPEN_H
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
||||
|
@ -9,8 +9,8 @@
|
||||
#ifndef LLVM_LIBC_SRC_FCNTL_OPENAT_H
|
||||
#define LLVM_LIBC_SRC_FCNTL_OPENAT_H
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include <fcntl.h>
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
||||
|
@ -5,7 +5,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../posix_spawn.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.types.mode_t
|
||||
libc.include.spawn
|
||||
libc.include.sys_syscall
|
||||
libc.include.signal
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/spawn/file_actions.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/types/mode_t.h"
|
||||
#include <signal.h> // For SIGCHLD
|
||||
#include <spawn.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
@ -5,7 +5,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../remove.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h" // For AT_* macros.
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h> // For AT_* macros.
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -5,7 +5,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../chmod.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.types.mode_t
|
||||
libc.include.sys_stat
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -19,6 +19,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../fchmod.h
|
||||
DEPENDS
|
||||
libc.hdr.types.mode_t
|
||||
libc.include.sys_stat
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -45,7 +46,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../mkdir.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.types.mode_t
|
||||
libc.include.sys_stat
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -84,7 +85,7 @@ add_entrypoint_object(
|
||||
../stat.h
|
||||
DEPENDS
|
||||
.kernel_statx
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
)
|
||||
@ -97,7 +98,7 @@ add_entrypoint_object(
|
||||
../lstat.h
|
||||
DEPENDS
|
||||
.kernel_statx
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
)
|
||||
@ -110,7 +111,7 @@ add_entrypoint_object(
|
||||
../fstat.h
|
||||
DEPENDS
|
||||
.kernel_statx
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
)
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/types/mode_t.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/types/mode_t.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/types/mode_t.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -5,6 +5,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../access.h
|
||||
DEPENDS
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -57,7 +58,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../dup2.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -254,7 +255,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../link.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -268,7 +269,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../linkat.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -377,7 +378,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../rmdir.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -391,7 +392,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../readlink.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -405,7 +406,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../readlinkat.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -419,7 +420,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../symlink.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -433,7 +434,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../symlinkat.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -485,7 +486,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../unlink.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
@ -499,7 +500,7 @@ add_entrypoint_object(
|
||||
HDRS
|
||||
../unlinkat.h
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -11,9 +11,9 @@
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include <fcntl.h>
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "src/__support/macros/config.h"
|
||||
#include "src/errno/libc_errno.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
|
||||
namespace LIBC_NAMESPACE_DECL {
|
||||
|
@ -42,7 +42,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
openat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.src.errno.errno
|
||||
libc.src.fcntl.open
|
||||
libc.src.fcntl.openat
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
|
||||
TEST(LlvmLibcUniStd, OpenAndReadTest) {
|
||||
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
|
||||
|
@ -9,7 +9,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
sendfile_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.fcntl.open
|
||||
|
@ -17,7 +17,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
namespace cpp = LIBC_NAMESPACE::cpp;
|
||||
|
@ -9,7 +9,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
chmod_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.fcntl.open
|
||||
@ -25,7 +25,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
fchmodat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.fcntl.open
|
||||
@ -41,7 +41,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
fchmod_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.fcntl.open
|
||||
@ -57,7 +57,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
mkdirat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.sys.stat.mkdirat
|
||||
@ -71,7 +71,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
stat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.sys.stat.stat
|
||||
@ -87,7 +87,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
lstat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.sys.stat.lstat
|
||||
@ -103,7 +103,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
fstat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_stat
|
||||
libc.src.errno.errno
|
||||
libc.src.sys.stat.fstat
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
TEST(LlvmLibcChmodTest, ChangeAndOpen) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
TEST(LlvmLibcChmodTest, ChangeAndOpen) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
TEST(LlvmLibcFchmodatTest, ChangeAndOpen) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
TEST(LlvmLibcFStatTest, CreatAndReadMode) {
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
TEST(LlvmLibcLStatTest, CreatAndReadMode) {
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
|
||||
TEST(LlvmLibcMkdiratTest, CreateAndRemove) {
|
||||
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
|
||||
|
@ -14,7 +14,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h>
|
||||
|
||||
TEST(LlvmLibcStatTest, CreatAndReadMode) {
|
||||
|
@ -24,11 +24,12 @@ add_libc_unittest(
|
||||
SRCS
|
||||
chdir_test.cpp
|
||||
DEPENDS
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.src.errno.errno
|
||||
libc.src.fcntl.open
|
||||
libc.src.unistd.chdir
|
||||
libc.src.unistd.close
|
||||
libc.src.fcntl.open
|
||||
libc.test.UnitTest.ErrnoSetterMatcher
|
||||
)
|
||||
|
||||
@ -223,7 +224,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
rmdir_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.src.errno.errno
|
||||
libc.src.sys.stat.mkdir
|
||||
libc.src.unistd.rmdir
|
||||
@ -262,7 +263,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
readlinkat_test.cpp
|
||||
DEPENDS
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.unistd
|
||||
libc.src.errno.errno
|
||||
libc.src.unistd.readlinkat
|
||||
@ -410,7 +411,7 @@ add_libc_unittest(
|
||||
syscall_test.cpp
|
||||
DEPENDS
|
||||
libc.include.unistd
|
||||
libc.include.fcntl
|
||||
libc.hdr.fcntl_macros
|
||||
libc.include.sys_syscall
|
||||
libc.src.errno.errno
|
||||
libc.src.unistd.__llvm_libc_syscall
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
|
||||
TEST(LlvmLibcChdirTest, ChangeAndOpen) {
|
||||
// The idea of this test is that we will first open an existing test file
|
||||
|
@ -13,7 +13,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
|
||||
TEST(LlvmLibcChdirTest, ChangeAndOpen) {
|
||||
// The idea of this test is that we will first open an existing test file
|
||||
|
@ -15,7 +15,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
|
||||
namespace cpp = LIBC_NAMESPACE::cpp;
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
|
||||
TEST(LlvmLibcRmdirTest, CreateAndRemove) {
|
||||
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include "hdr/fcntl_macros.h"
|
||||
#include <sys/stat.h> // For S_* flags.
|
||||
#include <sys/syscall.h> // For syscall numbers.
|
||||
#include <unistd.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user