[Lldb-commits] [PATCH] D22950: Centralize all calls to select() into a single class so we always call select properly
Adrian McCarthy via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 9 07:58:49 PDT 2016
I patched it in this morning, but it doesn't compile on Windows. I was
able to make it work with a few tweaks at the top of SelectHelper.cpp:
// C Includes
#include <errno.h>
#if defined(_WIN32)
#define NOMINMAX
#include <winsock2.h>
#else
#include <sys/select.h>
#endif
The key bits: don't include <sys/select.h> on Windows and #define NOMINMAX
on Windows to avoid stupid macros that conflict with std::min and std::max.
I'd probably put the #if under "// Other libraries and framework includes"
rather than "// C Includes", but that's a minor style nit. Either way,
this change makes it compile on Windows.
Adrian.
On Mon, Aug 8, 2016 at 5:05 PM, Greg Clayton <clayborg at gmail.com> wrote:
> clayborg updated this revision to Diff 67253.
> clayborg added a comment.
>
> Updated with all comments taken into account. Zach, please try this out
> and let me know if it compiles.
>
>
> https://reviews.llvm.org/D22950
>
> Files:
> include/lldb/Utility/SelectHelper.h
> lldb.xcodeproj/project.pbxproj
> source/Host/common/Editline.cpp
> source/Host/posix/ConnectionFileDescriptorPosix.cpp
> source/Host/posix/PipePosix.cpp
> source/Target/Process.cpp
> source/Utility/SelectHelper.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20160809/11ebdcd2/attachment.html>
More information about the lldb-commits
mailing list