[Lldb-commits] [lldb] r368125 - Detect HAVE_SYS_TYPES_H in lldb

Haibo Huang via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 6 23:15:01 PDT 2019


Author: hhb
Date: Tue Aug  6 23:15:01 2019
New Revision: 368125

URL: http://llvm.org/viewvc/llvm-project?rev=368125&view=rev
Log:
Detect HAVE_SYS_TYPES_H in lldb

Summary:
After rL368069 I noticed that HAVE_SYS_TYPES_H is not defined in
Platform.h, or anywhere else in lldb. This change fixes that.

Reviewers: labath

Subscribers: mgorny, lldb-commits

Tags: #lldb

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

Modified:
    lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
    lldb/trunk/include/lldb/Host/Config.h.cmake
    lldb/trunk/include/lldb/Host/windows/PosixApi.h
    lldb/trunk/source/Expression/UserExpression.cpp
    lldb/trunk/source/Expression/UtilityFunction.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
    lldb/trunk/tools/driver/Platform.h

Modified: lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake (original)
+++ lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake Tue Aug  6 23:15:01 2019
@@ -12,6 +12,7 @@ check_symbol_exists(sigaction signal.h H
 check_cxx_symbol_exists(accept4 "sys/socket.h" HAVE_ACCEPT4)
 
 check_include_file(termios.h HAVE_TERMIOS_H)
+check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
 check_include_files("sys/types.h;sys/event.h" HAVE_SYS_EVENT_H)
 
 check_cxx_symbol_exists(process_vm_readv "sys/uio.h" HAVE_PROCESS_VM_READV)

Modified: lldb/trunk/include/lldb/Host/Config.h.cmake
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/Config.h.cmake?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/Config.h.cmake (original)
+++ lldb/trunk/include/lldb/Host/Config.h.cmake Tue Aug  6 23:15:01 2019
@@ -19,6 +19,8 @@
 
 #define LLDB_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}"
 
+#cmakedefine01 HAVE_SYS_TYPES_H
+
 #cmakedefine01 HAVE_SYS_EVENT_H
 
 #cmakedefine01 HAVE_PPOLL

Modified: lldb/trunk/include/lldb/Host/windows/PosixApi.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/windows/PosixApi.h?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/windows/PosixApi.h (original)
+++ lldb/trunk/include/lldb/Host/windows/PosixApi.h Tue Aug  6 23:15:01 2019
@@ -9,6 +9,7 @@
 #ifndef liblldb_Host_windows_PosixApi_h
 #define liblldb_Host_windows_PosixApi_h
 
+#include "lldb/Host/Config.h"
 #include "llvm/Support/Compiler.h"
 #if !defined(_WIN32)
 #error "windows/PosixApi.h being #included on non Windows system!"
@@ -45,14 +46,14 @@
 #define S_IRWXG 0
 #define S_IRWXO 0
 
-#ifdef __MINGW32__
+#if HAVE_SYS_TYPES_H
 // pyconfig.h typedefs this.  We require python headers to be included before
 // any LLDB headers, but there's no way to prevent python's pid_t definition
 // from leaking, so this is the best option.
 #ifndef NO_PID_T
 #include <sys/types.h>
 #endif
-#endif // __MINGW32__
+#endif // HAVE_SYS_TYPES_H
 
 #ifdef _MSC_VER
 

Modified: lldb/trunk/source/Expression/UserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UserExpression.cpp?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/source/Expression/UserExpression.cpp (original)
+++ lldb/trunk/source/Expression/UserExpression.cpp Tue Aug  6 23:15:01 2019
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>

Modified: lldb/trunk/source/Expression/UtilityFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/UtilityFunction.cpp?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/source/Expression/UtilityFunction.cpp (original)
+++ lldb/trunk/source/Expression/UtilityFunction.cpp Tue Aug  6 23:15:01 2019
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp Tue Aug  6 23:15:01 2019
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include <stdio.h>
 #if HAVE_SYS_TYPES_H
 #include <sys/types.h>

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp Tue Aug  6 23:15:01 2019
@@ -6,6 +6,8 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "lldb/Host/Config.h"
+
 #include "ClangUtilityFunction.h"
 #include "ClangExpressionDeclMap.h"
 #include "ClangExpressionParser.h"

Modified: lldb/trunk/tools/driver/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/driver/Platform.h?rev=368125&r1=368124&r2=368125&view=diff
==============================================================================
--- lldb/trunk/tools/driver/Platform.h (original)
+++ lldb/trunk/tools/driver/Platform.h Tue Aug  6 23:15:01 2019
@@ -9,6 +9,8 @@
 #ifndef lldb_Platform_h_
 #define lldb_Platform_h_
 
+#include "lldb/Host/Config.h"
+
 #if defined(_WIN32)
 
 #include <io.h>




More information about the lldb-commits mailing list