asmith marked 6 inline comments as done.
asmith added inline comments.

================
Comment at: tools/lldb-server/SystemInitializerLLGS.cpp:37-52
+#if defined(_WIN32)
+  if (g_ref_count++ == 0) {
+    // Require Windows Sockets version 2.2.
+    auto wVersion = MAKEWORD(2, 2);
+    WSADATA wsaData;
+    auto err = WSAStartup(wVersion, &wsaData);
+    if (err == 0) {
----------------
labath wrote:
> zturner wrote:
> > labath wrote:
> > > I think a better option here would be to move this code to something like 
> > > `Socket::Initialize`. Then we could call this from 
> > > `SystemInitializerCommon::Initialize`, and it would be available to 
> > > everyone. This would allow us to remove the copy of this code in 
> > > PlatformWindows, and replace the `WSAStartup` calls in various unittests 
> > > with `Socket::Initialize()`
> > Also, why do we need the `g_ref_count`?  Can't we just print an error 
> > message and call exit if the version is not what we expect?
> I still believe this should go to Socket::Initialize (as a separate patch).
This is done in https://reviews.llvm.org/D60440


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56233/new/

https://reviews.llvm.org/D56233



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to