[Lldb-commits] [lldb] [lldb] Simplify preprocessor conditional (PR #124522)
Pavel Labath via lldb-commits
lldb-commits at lists.llvm.org
Mon Jan 27 01:09:35 PST 2025
https://github.com/labath created https://github.com/llvm/llvm-project/pull/124522
The long list of defines is just a very elaborate way to say "not windows".
>From 528535210c76c5700246069321be47a8cf3dc6e1 Mon Sep 17 00:00:00 2001
From: Pavel Labath <pavel at labath.sk>
Date: Mon, 27 Jan 2025 10:07:33 +0100
Subject: [PATCH] [lldb] Simplify preprocessor conditional
The long list of defines is just a very elaborate way to say "not
windows".
---
lldb/source/Host/common/Host.cpp | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp
index fdb623667bc251..d5054008268b9d 100644
--- a/lldb/source/Host/common/Host.cpp
+++ b/lldb/source/Host/common/Host.cpp
@@ -11,13 +11,19 @@
#include <climits>
#include <cstdlib>
#include <sys/types.h>
+
#ifndef _WIN32
#include <dlfcn.h>
#include <grp.h>
#include <netdb.h>
#include <pwd.h>
#include <sys/stat.h>
+#include <sys/syscall.h>
+#include <sys/wait.h>
#include <unistd.h>
+#if !defined(__ANDROID__)
+#include <spawn.h>
+#endif
#endif
#if defined(__APPLE__)
@@ -26,16 +32,6 @@
#include <mach/mach_port.h>
#endif
-#if defined(__linux__) || defined(__FreeBSD__) || \
- defined(__FreeBSD_kernel__) || defined(__APPLE__) || \
- defined(__NetBSD__) || defined(__OpenBSD__) || defined(__EMSCRIPTEN__)
-#if !defined(__ANDROID__)
-#include <spawn.h>
-#endif
-#include <sys/syscall.h>
-#include <sys/wait.h>
-#endif
-
#if defined(__FreeBSD__)
#include <pthread_np.h>
#endif
More information about the lldb-commits
mailing list