Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: third_party/libjingle/overrides/talk/base/win32.h

Issue 9455070: Remove the dependency to ws2_32.dll from talk_base::ThreadManager and talk_base::Thread. (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/libjingle/overrides/talk/base/win32.h
===================================================================
--- third_party/libjingle/overrides/talk/base/win32.h (revision 124320)
+++ third_party/libjingle/overrides/talk/base/win32.h (working copy)
@@ -47,11 +47,20 @@
#undef SetPort
+#include <stdlib.h>
#include <string>
#include "talk/base/stringutils.h"
#include "talk/base/basictypes.h"
+// This is to remove the dependency to ws2_32.dll especially for chrome,
+// where we don't load the ws2_32.dll in the render process.
+// This is correct only on little-endian machines.
+#define ntohl(x) _byteswap_ulong(x)
+#define ntohs(x) _byteswap_ushort(x)
+#define htonl(x) _byteswap_ulong(x)
+#define htons(x) _byteswap_ushort(x)
+
namespace talk_base {
const char* win32_inet_ntop(int af, const void *src, char* dst, socklen_t size);
« no previous file with comments | « third_party/libjingle/overrides/talk/base/thread.cc ('k') | third_party/libjingle/overrides/talk/base/win32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698