Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 0 additions & 2 deletions libc/hdr/types/sighandler_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@

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

using sighandler_t = __sighandler_t;

#else // overlay mode

#include <signal.h>
Expand Down
6 changes: 3 additions & 3 deletions libc/include/llvm-libc-macros/gpu/signal-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
#define SIGSEGV 11
#define SIGTERM 15

#define SIG_DFL ((__sighandler_t)(0))
#define SIG_IGN ((__sighandler_t)(1))
#define SIG_ERR ((__sighandler_t)(-1))
#define SIG_DFL ((void (*)(int))(0))
#define SIG_IGN ((void (*)(int))(1))
#define SIG_ERR ((void (*)(int))(-1))

// Max signal number
#define NSIG 64
Expand Down
6 changes: 3 additions & 3 deletions libc/include/llvm-libc-macros/linux/signal-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
#error "Signal stack sizes not defined for your platform."
#endif

#define SIG_DFL ((__sighandler_t)0)
#define SIG_IGN ((__sighandler_t)1)
#define SIG_ERR ((__sighandler_t)-1)
#define SIG_DFL ((void (*)(int))0)
#define SIG_IGN ((void (*)(int))1)
#define SIG_ERR ((void (*)(int))-1)

// SIGCHLD si_codes
#define CLD_EXITED 1 // child has exited
Expand Down
1 change: 1 addition & 0 deletions libc/include/llvm-libc-types/__sighandler_t.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
#define LLVM_LIBC_TYPES___SIGHANDLER_T_H

typedef void (*__sighandler_t)(int);
typedef __sighandler_t sighandler_t;

#endif // LLVM_LIBC_TYPES___SIGHANDLER_T_H
2 changes: 0 additions & 2 deletions libc/include/llvm-libc-types/struct_sigaction.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ struct sigaction {
#endif
};

typedef void (*__sighandler_t)(int);

#endif // LLVM_LIBC_TYPES_STRUCT_SIGACTION_H
11 changes: 6 additions & 5 deletions libc/include/signal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@ header: signal.h
header_template: signal.h.def
macros: []
types:
- type_name: __sighandler_t
- type_name: pid_t
- type_name: stack_t
- type_name: sig_atomic_t
- type_name: siginfo_t
- type_name: struct_sigaction
- type_name: sigset_t
- type_name: stack_t
- type_name: struct_sigaction
- type_name: union_sigval
- type_name: sig_atomic_t
enums: []
objects: []
functions:
Expand Down Expand Up @@ -69,10 +70,10 @@ functions:
- name: signal
standards:
- stdc
return_type: __sighandler_t
return_type: sighandler_t
arguments:
- type: int
- type: __sighandler_t
- type: sighandler_t
- name: sigprocmask
standards:
- POSIX
Expand Down