[libc-commits] [libc] [libc][signal] clean up usage of sighandler_t (PR #125745)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Feb 4 11:13:53 PST 2025
================
@@ -8,14 +8,16 @@
#include "src/signal/signal.h"
#include "hdr/signal_macros.h"
-#include "hdr/types/sighandler_t.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/signal/sigaction.h"
namespace LIBC_NAMESPACE_DECL {
-LLVM_LIBC_FUNCTION(sighandler_t, signal, (int signum, sighandler_t handler)) {
+// Our LLVM_LIBC_FUNCTION macro doesn't handle function pointer return types.
+using signal_handler = void (*)(int);
----------------
nickdesaulniers wrote:
Perhaps `auto` would work...
https://github.com/llvm/llvm-project/pull/125745
More information about the libc-commits
mailing list