mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-16 16:56:35 +00:00
[libc] add proxy header for struct_sigaction (#96224)
This commit is contained in:
parent
a89a54190c
commit
133492fe18
@ -126,3 +126,12 @@ add_proxy_header_library(
|
||||
libc.include.llvm-libc-types.atexithandler_t
|
||||
libc.include.stdlib
|
||||
)
|
||||
|
||||
add_proxy_header_library(
|
||||
struct_sigaction
|
||||
HDRS
|
||||
struct_sigaction.h
|
||||
FULL_BUILD_DEPENDS
|
||||
libc.include.llvm-libc-types.struct_sigaction
|
||||
libc.include.signal
|
||||
)
|
||||
|
21
libc/hdr/types/struct_sigaction.h
Normal file
21
libc/hdr/types/struct_sigaction.h
Normal file
@ -0,0 +1,21 @@
|
||||
//===-- Proxy for struct sigaction ---------------------------------------===//
|
||||
//
|
||||
// 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_STRUCT_SIGACTION_H
|
||||
#define LLVM_LIBC_HDR_TYPES_STRUCT_SIGACTION_H
|
||||
|
||||
#ifdef LIBC_FULL_BUILD
|
||||
|
||||
#include "include/llvm-libc-types/struct_sigaction.h"
|
||||
|
||||
#else
|
||||
|
||||
#include <signal.h>
|
||||
|
||||
#endif // LIBC_FULL_BUILD
|
||||
|
||||
#endif // LLVM_LIBC_HDR_TYPES_STRUCT_SIGACTION_H
|
@ -60,6 +60,7 @@ add_entrypoint_object(
|
||||
DEPENDS
|
||||
.__restore
|
||||
libc.hdr.types.sigset_t
|
||||
libc.hdr.types.struct_sigaction
|
||||
libc.include.sys_syscall
|
||||
libc.src.__support.OSUtil.osutil
|
||||
libc.src.errno.errno
|
||||
@ -124,7 +125,7 @@ add_entrypoint_object(
|
||||
../signal.h
|
||||
DEPENDS
|
||||
.sigaction
|
||||
libc.include.signal
|
||||
libc.hdr.signal_macros
|
||||
)
|
||||
|
||||
add_entrypoint_object(
|
||||
|
@ -7,11 +7,9 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "src/signal/signal.h"
|
||||
#include "src/signal/sigaction.h"
|
||||
|
||||
#include "hdr/signal_macros.h"
|
||||
#include "src/__support/common.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include "src/signal/sigaction.h"
|
||||
|
||||
namespace LIBC_NAMESPACE {
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#ifndef LLVM_LIBC_SRC_SIGNAL_SIGACTION_H
|
||||
#define LLVM_LIBC_SRC_SIGNAL_SIGACTION_H
|
||||
|
||||
#include <signal.h>
|
||||
#include "hdr/types/struct_sigaction.h"
|
||||
|
||||
namespace LIBC_NAMESPACE {
|
||||
|
||||
|
@ -32,8 +32,8 @@ add_libc_unittest(
|
||||
SRCS
|
||||
sigaction_test.cpp
|
||||
DEPENDS
|
||||
libc.include.errno
|
||||
libc.include.signal
|
||||
libc.hdr.errno_macros
|
||||
libc.hdr.signal_macros
|
||||
libc.src.signal.raise
|
||||
libc.src.signal.sigaction
|
||||
libc.test.UnitTest.ErrnoSetterMatcher
|
||||
@ -119,7 +119,7 @@ add_libc_unittest(
|
||||
SRCS
|
||||
sigaltstack_test.cpp
|
||||
DEPENDS
|
||||
libc.include.signal
|
||||
libc.hdr.signal_macros
|
||||
libc.src.errno.errno
|
||||
libc.src.signal.raise
|
||||
libc.src.signal.sigaltstack
|
||||
|
@ -6,15 +6,13 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "hdr/errno_macros.h"
|
||||
#include "hdr/signal_macros.h"
|
||||
#include "src/signal/raise.h"
|
||||
#include "src/signal/sigaction.h"
|
||||
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
|
||||
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
|
||||
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
|
||||
|
||||
|
@ -6,17 +6,16 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "hdr/signal_macros.h"
|
||||
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
|
||||
#include "src/errno/libc_errno.h"
|
||||
#include "src/signal/linux/signal_utils.h"
|
||||
#include "src/signal/raise.h"
|
||||
#include "src/signal/sigaction.h"
|
||||
#include "src/signal/sigaltstack.h"
|
||||
|
||||
#include "test/UnitTest/ErrnoSetterMatcher.h"
|
||||
#include "test/UnitTest/Test.h"
|
||||
|
||||
#include <signal.h>
|
||||
#include <stdint.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user