summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2016-08-09 23:06:08 +0000
committerZachary Turner <zturner@google.com>2016-08-09 23:06:08 +0000
commitf343968f5d87a91e020a5baf03c280ce7aa9cdb1 (patch)
tree435027dd511241ce0ff6c4791e37c87648c35697 /lldb/source/Utility
parentcef001aaaa679665f9ca59873ca954c161f90ca5 (diff)
downloadbcm5719-llvm-f343968f5d87a91e020a5baf03c280ce7aa9cdb1.tar.gz
bcm5719-llvm-f343968f5d87a91e020a5baf03c280ce7aa9cdb1.zip
Delete Host/windows/win32.h
It's always hard to remember when to include this file, and when you do include it it's hard to remember what preprocessor check it needs to be behind, and then you further have to remember whether it's windows.h or win32.h which you need to include. This patch changes the name to PosixApi.h, which is more appropriately named, and makes it independent of any preprocessor setting. There's still the issue of people not knowing when to include this, because there's not a well-defined set of things it exposes other than "whatever is missing on Windows", but at least this should make it less painful to fix when problems arise. This patch depends on LLVM revision r278170. llvm-svn: 278177
Diffstat (limited to 'lldb/source/Utility')
-rw-r--r--lldb/source/Utility/PseudoTerminal.cpp16
-rw-r--r--lldb/source/Utility/TimeSpecTimeout.h1
2 files changed, 3 insertions, 14 deletions
diff --git a/lldb/source/Utility/PseudoTerminal.cpp b/lldb/source/Utility/PseudoTerminal.cpp
index 94c75daa873..7a200f2a817 100644
--- a/lldb/source/Utility/PseudoTerminal.cpp
+++ b/lldb/source/Utility/PseudoTerminal.cpp
@@ -18,21 +18,9 @@
#include <sys/ioctl.h>
#endif
-#ifdef _WIN32
-#include "lldb/Host/windows/win32.h"
-typedef uint32_t pid_t;
-// empty functions
-int posix_openpt(int flag) { return 0; }
+#include "lldb/Host/PosixApi.h"
-int strerror_r(int errnum, char *buf, size_t buflen) { return 0; }
-
-int unlockpt(int fd) { return 0; }
-int grantpt(int fd) { return 0; }
-char *ptsname(int fd) { return 0; }
-
-pid_t fork(void) { return 0; }
-pid_t setsid(void) { return 0; }
-#elif defined(__ANDROID_NDK__)
+#if defined(__ANDROID_NDK__)
int posix_openpt(int flags);
#endif
diff --git a/lldb/source/Utility/TimeSpecTimeout.h b/lldb/source/Utility/TimeSpecTimeout.h
index 388ccc179c1..8f809ace3c9 100644
--- a/lldb/source/Utility/TimeSpecTimeout.h
+++ b/lldb/source/Utility/TimeSpecTimeout.h
@@ -10,6 +10,7 @@
#ifndef utility_TimeSpecTimeout_h_
#define utility_TimeSpecTimeout_h_
+#include "lldb/Host/PosixApi.h"
#include "lldb/Host/TimeValue.h"
namespace lldb_private {
OpenPOWER on IntegriCloud