webrtc_m130/webrtc/base/byteorder.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

179 lines
4.5 KiB
C
Raw Normal View History

/*
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_BASE_BYTEORDER_H_
#define WEBRTC_BASE_BYTEORDER_H_
#if defined(WEBRTC_POSIX) && !defined(__native_client__)
#include <arpa/inet.h>
#endif
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
#include "webrtc/base/basictypes.h"
#if defined(WEBRTC_MAC)
#include <libkern/OSByteOrder.h>
#define htobe16(v) OSSwapHostToBigInt16(v)
#define htobe32(v) OSSwapHostToBigInt32(v)
#define htobe64(v) OSSwapHostToBigInt64(v)
#define be16toh(v) OSSwapBigToHostInt16(v)
#define be32toh(v) OSSwapBigToHostInt32(v)
#define be64toh(v) OSSwapBigToHostInt64(v)
#define htole16(v) OSSwapHostToLittleInt16(v)
#define htole32(v) OSSwapHostToLittleInt32(v)
#define htole64(v) OSSwapHostToLittleInt64(v)
#define le16toh(v) OSSwapLittleToHostInt16(v)
#define le32toh(v) OSSwapLittleToHostInt32(v)
#define le64toh(v) OSSwapLittleToHostInt64(v)
#elif defined(WEBRTC_WIN) || defined(__native_client__)
Revert of Use native (optimized) functions for byte order conversion. (patchset #3 id:40001 of https://codereview.webrtc.org/2738063005/ ) Reason for revert: Breaks Chromium FYI bots: http://build.chromium.org/p/chromium.webrtc.fyi/builders/Mac%20Builder/builds/22469 http://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Builder/builds/14885 FAILED: newlib_pnacl/obj/third_party/webrtc/base/rtc_base/networkmonitor.o /b/c/goma_client/gomacc ../../native_client/toolchain/linux_x86/pnacl_newlib/bin/pnacl-clang++ -MMD -MF newlib_pnacl/obj/third_party/webrtc/base/rtc_base/networkmonitor.o.d -DNACL_TC_REV=62bfd122aee87d4eb4a7876950e18c793c626cd0 -Dtimezone=_timezone -DV8_DEPRECATION_WARNINGS -DUSE_OPENSSL_CERTS=1 -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DWEBRTC_RESTRICT_LOGGING -DEXPAT_RELATIVE_PATH -DHAVE_SCTP -DENABLE_EXTERNAL_AUTH -DHAVE_WEBRTC_VIDEO -DHAVE_WEBRTC_VOICE -DLOGGING_INSIDE_WEBRTC -DUSE_WEBRTC_DEV_BRANCH -DFEATURE_ENABLE_VOICEMAIL -DEXPAT_RELATIVE_PATH -DGTEST_RELATIVE_PATH -DNO_MAIN_THREAD_WRAPPING -DNO_SOUND_SYSTEM -DWEBRTC_CHROMIUM_BUILD -DWEBRTC_POSIX -DNO_MAIN_THREAD_WRAPPING -I../../third_party/boringssl/src/include -I../.. -Inewlib_pnacl/gen -I../../third_party/webrtc_overrides -I../../third_party -I../../third_party/boringssl/src/include -I../../native_client_sdk/src/libraries -I../../native_client_sdk/src/libraries/nacl_io/include -I../../native_client_sdk/src/libraries/third_party/newlib-extras -Wno-uninitialized -fno-strict-aliasing -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -O2 -fno-ident -fdata-sections -ffunction-sections -g0 -fvisibility=hidden -Werror -Wno-unused-variable -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-deprecated-register -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -fvisibility-inlines-hidden -std=gnu++11 -fno-rtti -fno-exceptions -c ../../third_party/webrtc/base/networkmonitor.cc -o newlib_pnacl/obj/third_party/webrtc/base/rtc_base/networkmonitor.o In file included from ../../third_party/webrtc/base/networkmonitor.cc:11: In file included from ../../third_party/webrtc/base/networkmonitor.h:16: In file included from ../../third_party/webrtc/base/thread.h:25: In file included from ../../third_party/webrtc/base/messagequeue.h:31: In file included from ../../third_party/webrtc/base/socketserver.h:15: In file included from ../../third_party/webrtc/base/socketfactory.h:14: In file included from ../../third_party/webrtc/base/socket.h:30: In file included from ../../third_party/webrtc/base/socketaddress.h:18: In file included from ../../third_party/webrtc/base/ipaddress.h:29: ../../third_party/webrtc/base/byteorder.h:37:10: fatal error: 'endian.h' file not found #include <endian.h> ^ 1 error generated. Original issue's description: > Use native (optimized) functions for byte order conversion. > > Instead of manually copying single bytes, the native functions like "htobe32" > are used. > > BUG=None > > Review-Url: https://codereview.webrtc.org/2738063005 > Cr-Commit-Position: refs/heads/master@{#17277} > Committed: https://chromium.googlesource.com/external/webrtc/+/38fd44e51cbde57a277b85368ad247077642d13d TBR=tommi@webrtc.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=None Review-Url: https://codereview.webrtc.org/2757703002 Cr-Commit-Position: refs/heads/master@{#17278}
2017-03-16 10:34:37 -07:00
#if defined(WEBRTC_WIN)
#include <stdlib.h>
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
#include <winsock2.h>
#else
#include <netinet/in.h>
#endif
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
#define htobe16(v) htons(v)
#define htobe32(v) htonl(v)
#define be16toh(v) ntohs(v)
#define be32toh(v) ntohl(v)
#if defined(WEBRTC_WIN)
#define htobe64(v) htonll(v)
#define be64toh(v) ntohll(v)
#endif
#if defined(RTC_ARCH_CPU_LITTLE_ENDIAN)
#define htole16(v) (v)
#define htole32(v) (v)
#define htole64(v) (v)
#define le16toh(v) (v)
#define le32toh(v) (v)
#define le64toh(v) (v)
#if defined(__native_client__)
#define htobe64(v) __builtin_bswap64(v)
#define be64toh(v) __builtin_bswap64(v)
#endif
#elif defined(RTC_ARCH_CPU_BIG_ENDIAN)
#define htole16(v) __builtin_bswap16(v)
#define htole32(v) __builtin_bswap32(v)
#define htole64(v) __builtin_bswap64(v)
#define le16toh(v) __builtin_bswap16(v)
#define le32toh(v) __builtin_bswap32(v)
#define le64toh(v) __builtin_bswap64(v)
#if defined(__native_client__)
#define htobe64(v) (v)
#define be64toh(v) (v)
#endif
#else
#error RTC_ARCH_CPU_BIG_ENDIAN or RTC_ARCH_CPU_LITTLE_ENDIAN must be defined.
#endif // defined(RTC_ARCH_CPU_LITTLE_ENDIAN)
#elif defined(WEBRTC_POSIX)
#include <endian.h>
#endif
namespace rtc {
// Reading and writing of little and big-endian numbers from memory
inline void Set8(void* memory, size_t offset, uint8_t v) {
static_cast<uint8_t*>(memory)[offset] = v;
}
inline uint8_t Get8(const void* memory, size_t offset) {
return static_cast<const uint8_t*>(memory)[offset];
}
inline void SetBE16(void* memory, uint16_t v) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
*static_cast<uint16_t*>(memory) = htobe16(v);
}
inline void SetBE32(void* memory, uint32_t v) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
*static_cast<uint32_t*>(memory) = htobe32(v);
}
inline void SetBE64(void* memory, uint64_t v) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
*static_cast<uint64_t*>(memory) = htobe64(v);
}
inline uint16_t GetBE16(const void* memory) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return be16toh(*static_cast<const uint16_t*>(memory));
}
inline uint32_t GetBE32(const void* memory) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return be32toh(*static_cast<const uint32_t*>(memory));
}
inline uint64_t GetBE64(const void* memory) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return be64toh(*static_cast<const uint64_t*>(memory));
}
inline void SetLE16(void* memory, uint16_t v) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
*static_cast<uint16_t*>(memory) = htole16(v);
}
inline void SetLE32(void* memory, uint32_t v) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
*static_cast<uint32_t*>(memory) = htole32(v);
}
inline void SetLE64(void* memory, uint64_t v) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
*static_cast<uint64_t*>(memory) = htole64(v);
}
inline uint16_t GetLE16(const void* memory) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return le16toh(*static_cast<const uint16_t*>(memory));
}
inline uint32_t GetLE32(const void* memory) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return le32toh(*static_cast<const uint32_t*>(memory));
}
inline uint64_t GetLE64(const void* memory) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return le64toh(*static_cast<const uint64_t*>(memory));
}
// Check if the current host is big endian.
inline bool IsHostBigEndian() {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
#if defined(RTC_ARCH_CPU_BIG_ENDIAN)
return true;
#else
return false;
#endif
}
inline uint16_t HostToNetwork16(uint16_t n) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return htobe16(n);
}
inline uint32_t HostToNetwork32(uint32_t n) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return htobe32(n);
}
inline uint64_t HostToNetwork64(uint64_t n) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return htobe64(n);
}
inline uint16_t NetworkToHost16(uint16_t n) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return be16toh(n);
}
inline uint32_t NetworkToHost32(uint32_t n) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return be32toh(n);
}
inline uint64_t NetworkToHost64(uint64_t n) {
Reland: Use native (optimized) functions for byte order conversion. (patchset #1 id:1 of https://codereview.webrtc.org/2755103002/ ) Reason for revert: The problem with the internal project has been solved according to mbonadei@ Original issue's description: > Revert of Reland: Use native (optimized) functions for byte order conversion. (patchset #5 id:80001 of https://codereview.webrtc.org/2751403003/ ) > > Reason for revert: > Breaks internal project. > > Original issue's description: > > Reland: Use native (optimized) functions for byte order conversion. > > > > Instead of manually copying single bytes, the native functions like "htobe32" > > are used. > > > > The previous CL https://codereview.webrtc.org/2738063005/ got reverted in > > https://codereview.webrtc.org/2757703002/ > > > > Reland with the compilation errors fixed. > > > > BUG=None > > > > Review-Url: https://codereview.webrtc.org/2751403003 > > Cr-Commit-Position: refs/heads/master@{#17280} > > Committed: https://chromium.googlesource.com/external/webrtc/+/c8a4c1f24ca3a2ececeb1b3774e1fc80f8ffe631 > > TBR=tommi@webrtc.org,jbauch@webrtc.org > # Skipping CQ checks because original CL landed less than 1 days ago. > NOPRESUBMIT=true > NOTREECHECKS=true > NOTRY=true > BUG=None > > Review-Url: https://codereview.webrtc.org/2755103002 > Cr-Commit-Position: refs/heads/master@{#17282} > Committed: https://chromium.googlesource.com/external/webrtc/+/44122bd0f96b30983091f5be26b57e45f6cc9e33 TBR=tommi@webrtc.org,kthelgason@webrtc.org # Not skipping CQ checks because original CL landed more than 1 days ago. BUG=None Review-Url: https://codereview.webrtc.org/2786993003 Cr-Commit-Position: refs/heads/master@{#17479}
2017-03-31 01:42:09 -07:00
return be64toh(n);
}
} // namespace rtc
#endif // WEBRTC_BASE_BYTEORDER_H_