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

Side by Side Diff: third_party/libjingle/overrides/talk/base/byteorder.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, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * libjingle 2 * libjingle
3 * Copyright 2004--2005, Google Inc. 3 * Copyright 2004--2005, Google Inc.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are met: 6 * modification, are permitted provided that the following conditions are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright notice, 8 * 1. Redistributions of source code must retain the above copyright notice,
9 * this list of conditions and the following disclaimer. 9 * this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright notice, 10 * 2. Redistributions in binary form must reproduce the above copyright notice,
(...skipping 16 matching lines...) Expand all
27 27
28 #ifndef TALK_BASE_BYTEORDER_H__ 28 #ifndef TALK_BASE_BYTEORDER_H__
29 #define TALK_BASE_BYTEORDER_H__ 29 #define TALK_BASE_BYTEORDER_H__
30 30
31 #ifdef POSIX 31 #ifdef POSIX
32 #include <arpa/inet.h> 32 #include <arpa/inet.h>
33 #endif 33 #endif
34 34
35 #ifdef WIN32 35 #ifdef WIN32
36 #include <winsock2.h> 36 #include <winsock2.h>
37 #include "talk/base/win32.h"
37 #endif 38 #endif
38 39
39 #include "talk/base/basictypes.h" 40 #include "talk/base/basictypes.h"
40 41
41 namespace talk_base { 42 namespace talk_base {
42 43
43 // Reading and writing of little and big-endian numbers from memory 44 // Reading and writing of little and big-endian numbers from memory
44 // TODO: Add HostEndian #defines (HE) 45 // TODO: Add HostEndian #defines (HE)
45 // TODO: Consider NetworkEndian as synonym for BigEndian, for clarity in use. 46 // TODO: Consider NetworkEndian as synonym for BigEndian, for clarity in use.
46 // TODO: Consider creating optimized versions, such as direct read/writes of 47 // TODO: Consider creating optimized versions, such as direct read/writes of
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 164 }
164 165
165 inline uint64 NetworkToHost64(uint64 n) { 166 inline uint64 NetworkToHost64(uint64 n) {
166 // If the host is little endian, GetBE64 converts n to little endian. 167 // If the host is little endian, GetBE64 converts n to little endian.
167 return IsHostBigEndian() ? n : GetBE64(&n); 168 return IsHostBigEndian() ? n : GetBE64(&n);
168 } 169 }
169 170
170 } // namespace talk_base 171 } // namespace talk_base
171 172
172 #endif // TALK_BASE_BYTEORDER_H__ 173 #endif // TALK_BASE_BYTEORDER_H__
OLDNEW
« no previous file with comments | « third_party/libjingle/libjingle.gyp ('k') | third_party/libjingle/overrides/talk/base/messagequeue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698