[Lldb-commits] [lldb] 82dc463 - [lldb] Get rid of HAVE_SIGACTION

Nico Weber via lldb-commits lldb-commits at lists.llvm.org
Mon Aug 2 11:11:58 PDT 2021


Author: Nico Weber
Date: 2021-08-02T20:11:35+02:00
New Revision: 82dc463bb356200fd46b90d6d5a439c3c9b31c92

URL: https://github.com/llvm/llvm-project/commit/82dc463bb356200fd46b90d6d5a439c3c9b31c92
DIFF: https://github.com/llvm/llvm-project/commit/82dc463bb356200fd46b90d6d5a439c3c9b31c92.diff

LOG: [lldb] Get rid of HAVE_SIGACTION

The .cpp file uses SIGNAL_POLLING_UNSUPPORTED to guard the call
to sigaction, so use it in the .h file too. (LLVM also calls
sigaction without a guard on non-Windows.)

No behavior change.

Differential Revision: https://reviews.llvm.org/D107255

Added: 
    

Modified: 
    lldb/cmake/modules/LLDBGenerateConfig.cmake
    lldb/include/lldb/Host/Config.h.cmake
    lldb/include/lldb/Host/MainLoop.h

Removed: 
    


################################################################################
diff  --git a/lldb/cmake/modules/LLDBGenerateConfig.cmake b/lldb/cmake/modules/LLDBGenerateConfig.cmake
index caeb3969002bb..646720a740985 100644
--- a/lldb/cmake/modules/LLDBGenerateConfig.cmake
+++ b/lldb/cmake/modules/LLDBGenerateConfig.cmake
@@ -9,7 +9,6 @@ set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
 check_symbol_exists(ppoll poll.h HAVE_PPOLL)
 check_symbol_exists(ptsname_r stdlib.h HAVE_PTSNAME_R)
 set(CMAKE_REQUIRED_DEFINITIONS)
-check_symbol_exists(sigaction signal.h HAVE_SIGACTION)
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)

diff  --git a/lldb/include/lldb/Host/Config.h.cmake b/lldb/include/lldb/Host/Config.h.cmake
index c667708a90a64..f691ef3abb8ff 100644
--- a/lldb/include/lldb/Host/Config.h.cmake
+++ b/lldb/include/lldb/Host/Config.h.cmake
@@ -22,8 +22,6 @@
 
 #cmakedefine01 HAVE_PTSNAME_R
 
-#cmakedefine01 HAVE_SIGACTION
-
 #cmakedefine01 HAVE_PROCESS_VM_READV
 
 #cmakedefine01 HAVE_NR_PROCESS_VM_READV

diff  --git a/lldb/include/lldb/Host/MainLoop.h b/lldb/include/lldb/Host/MainLoop.h
index 06785bbdbe246..94499f5834633 100644
--- a/lldb/include/lldb/Host/MainLoop.h
+++ b/lldb/include/lldb/Host/MainLoop.h
@@ -95,7 +95,7 @@ class MainLoop : public MainLoopBase {
 
   struct SignalInfo {
     std::list<Callback> callbacks;
-#if HAVE_SIGACTION
+#ifndef SIGNAL_POLLING_UNSUPPORTED
     struct sigaction old_action;
 #endif
     bool was_blocked : 1;


        


More information about the lldb-commits mailing list