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

Side by Side Diff: webrtc/base/basictypes.h

Issue 1556743002: Bind a socket to a network if the network handle is set. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 11 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 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #endif 46 #endif
47 47
48 #if defined(RTC_ARCH_CPU_BIG_ENDIAN) && defined(RTC_ARCH_CPU_LITTLE_ENDIAN) 48 #if defined(RTC_ARCH_CPU_BIG_ENDIAN) && defined(RTC_ARCH_CPU_LITTLE_ENDIAN)
49 #error RTC_ARCH_CPU_BIG_ENDIAN and RTC_ARCH_CPU_LITTLE_ENDIAN both defined. 49 #error RTC_ARCH_CPU_BIG_ENDIAN and RTC_ARCH_CPU_LITTLE_ENDIAN both defined.
50 #endif 50 #endif
51 51
52 #if defined(WEBRTC_WIN) 52 #if defined(WEBRTC_WIN)
53 typedef int socklen_t; 53 typedef int socklen_t;
54 #endif 54 #endif
55 55
56 typedef uint32_t NetworkHandle;
57
pthatcher1 2016/01/06 21:58:46 Why is this in basictypes.h? Shouldn't it be in
honghaiz3 2016/01/12 20:36:42 Done.
56 // The following only works for C++ 58 // The following only works for C++
57 #ifdef __cplusplus 59 #ifdef __cplusplus
58 60
59 #ifndef ALIGNP 61 #ifndef ALIGNP
60 #define ALIGNP(p, t) \ 62 #define ALIGNP(p, t) \
61 (reinterpret_cast<uint8_t*>(((reinterpret_cast<uintptr_t>(p) + \ 63 (reinterpret_cast<uint8_t*>(((reinterpret_cast<uintptr_t>(p) + \
62 ((t) - 1)) & ~((t) - 1)))) 64 ((t) - 1)) & ~((t) - 1))))
63 #endif 65 #endif
64 66
65 #define RTC_IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1))) 67 #define RTC_IS_ALIGNED(p, a) (!((uintptr_t)(p) & ((a) - 1)))
66 68
67 // Use these to declare and define a static local variable that gets leaked so 69 // Use these to declare and define a static local variable that gets leaked so
68 // that its destructors are not called at exit. 70 // that its destructors are not called at exit.
69 #define RTC_DEFINE_STATIC_LOCAL(type, name, arguments) \ 71 #define RTC_DEFINE_STATIC_LOCAL(type, name, arguments) \
70 static type& name = *new type arguments 72 static type& name = *new type arguments
71 73
72 #endif // __cplusplus 74 #endif // __cplusplus
73 75
74 #endif // WEBRTC_BASE_BASICTYPES_H_ 76 #endif // WEBRTC_BASE_BASICTYPES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698