Skip to content

Commit 3730708

Browse files
remove any typedef for __sighandler_t, rename files
1 parent 5864bf7 commit 3730708

File tree

6 files changed

+20
-25
lines changed

6 files changed

+20
-25
lines changed

libc/include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,9 @@ add_header_macro(
275275
signal.h
276276
DEPENDS
277277
.llvm-libc-macros.signal_macros
278-
.llvm-libc-types.__sighandler_t
279278
.llvm-libc-types.pid_t
280279
.llvm-libc-types.sig_atomic_t
280+
.llvm-libc-types.sighandler_t
281281
.llvm-libc-types.siginfo_t
282282
.llvm-libc-types.sigset_t
283283
.llvm-libc-types.stack_t

libc/include/llvm-libc-types/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ add_header(__pthread_start_t HDR __pthread_start_t.h)
1515
add_header(__pthread_tss_dtor_t HDR __pthread_tss_dtor_t.h)
1616
add_header(__qsortcompare_t HDR __qsortcompare_t.h)
1717
add_header(__qsortrcompare_t HDR __qsortrcompare_t.h)
18-
add_header(__sighandler_t HDR __sighandler_t.h)
1918
add_header(__thread_type HDR __thread_type.h)
2019
add_header(blkcnt_t HDR blkcnt_t.h)
2120
add_header(blksize_t HDR blksize_t.h)
@@ -65,6 +64,7 @@ if(LIBC_TYPES_TIME_T_IS_32_BIT)
6564
else()
6665
add_header(time_t HDR time_t_64.h DEST_HDR time_t.h)
6766
endif()
67+
add_header(sighandler_t HDR sighandler_t.h)
6868
add_header(stack_t HDR stack_t.h DEPENDS .size_t)
6969
add_header(suseconds_t HDR suseconds_t.h)
7070
add_header(struct_flock HDR struct_flock.h DEPENDS .off_t .pid_t)

libc/include/llvm-libc-types/__sighandler_t.h

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//===-- Definition of sighandler_t ----------------------------------------===//
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+
//===----------------------------------------------------------------------===//
8+
9+
#ifndef LLVM_LIBC_TYPES_SIGHANDLER_T_H
10+
#define LLVM_LIBC_TYPES_SIGHANDLER_T_H
11+
12+
#ifdef __linux__
13+
// For compatibility with glibc.
14+
typedef void (*sighandler_t)(int);
15+
#endif
16+
17+
#endif // LLVM_LIBC_TYPES_SIGHANDLER_T_H

libc/include/signal.h.def

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@
1616

1717
#include "llvm-libc-macros/signal-macros.h"
1818

19-
#ifdef __linux__
20-
#include "llvm-libc-types/__sighandler_t.h"
21-
#endif
22-
2319
%%public_api()
2420

2521
#endif // LLVM_LIBC_SIGNAL_H

libc/include/signal.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ macros: []
44
types:
55
- type_name: pid_t
66
- type_name: sig_atomic_t
7+
- type_name: sighandler_t
78
- type_name: siginfo_t
89
- type_name: sigset_t
910
- type_name: stack_t

0 commit comments

Comments
 (0)