| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
| 11 // This file contains platform-specific typedefs and defines. | 11 // This file contains platform-specific typedefs and defines. |
| 12 // Much of it is derived from Chromium's build/build_config.h. | 12 // Much of it is derived from Chromium's build/build_config.h. |
| 13 | 13 |
| 14 #ifndef WEBRTC_TYPEDEFS_H_ | 14 #ifndef WEBRTC_TYPEDEFS_H_ |
| 15 #define WEBRTC_TYPEDEFS_H_ | 15 #define WEBRTC_TYPEDEFS_H_ |
| 16 | 16 |
| 17 // Processor architecture detection. For more info on what's defined, see: | 17 // Processor architecture detection. For more info on what's defined, see: |
| 18 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx | 18 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx |
| 19 // http://www.agner.org/optimize/calling_conventions.pdf | 19 // http://www.agner.org/optimize/calling_conventions.pdf |
| 20 // or with gcc, run: "echo | gcc -E -dM -" | 20 // or with gcc, run: "echo | gcc -E -dM -" |
| 21 #if defined(_M_X64) || defined(__x86_64__) | 21 #if defined(_M_X64) || defined(__x86_64__) |
| 22 #define WEBRTC_ARCH_X86_FAMILY | 22 #define WEBRTC_ARCH_X86_FAMILY |
| 23 #define WEBRTC_ARCH_X86_64 | 23 #define WEBRTC_ARCH_X86_64 |
| 24 #define WEBRTC_ARCH_64_BITS | 24 #define WEBRTC_ARCH_64_BITS |
| 25 #define WEBRTC_ARCH_LITTLE_ENDIAN | 25 #define WEBRTC_ARCH_LITTLE_ENDIAN |
| 26 #elif defined(__aarch64__) | 26 #elif defined(__aarch64__) |
| 27 #define WEBRTC_ARCH_ARM_FAMILY |
| 27 #define WEBRTC_ARCH_64_BITS | 28 #define WEBRTC_ARCH_64_BITS |
| 28 #define WEBRTC_ARCH_LITTLE_ENDIAN | 29 #define WEBRTC_ARCH_LITTLE_ENDIAN |
| 29 #elif defined(_M_IX86) || defined(__i386__) | 30 #elif defined(_M_IX86) || defined(__i386__) |
| 30 #define WEBRTC_ARCH_X86_FAMILY | 31 #define WEBRTC_ARCH_X86_FAMILY |
| 31 #define WEBRTC_ARCH_X86 | 32 #define WEBRTC_ARCH_X86 |
| 32 #define WEBRTC_ARCH_32_BITS | 33 #define WEBRTC_ARCH_32_BITS |
| 33 #define WEBRTC_ARCH_LITTLE_ENDIAN | 34 #define WEBRTC_ARCH_LITTLE_ENDIAN |
| 34 #elif defined(__ARMEL__) | 35 #elif defined(__ARMEL__) |
| 35 // TODO(ajm): We'd prefer to control platform defines here, but this is | 36 #define WEBRTC_ARCH_ARM_FAMILY |
| 36 // currently provided by the Android makefiles. Commented to avoid duplicate | |
| 37 // definition warnings. | |
| 38 //#define WEBRTC_ARCH_ARM | |
| 39 // TODO(ajm): Chromium uses the following two defines. Should we switch? | |
| 40 //#define WEBRTC_ARCH_ARM_FAMILY | |
| 41 //#define WEBRTC_ARCH_ARMEL | |
| 42 #define WEBRTC_ARCH_32_BITS | 37 #define WEBRTC_ARCH_32_BITS |
| 43 #define WEBRTC_ARCH_LITTLE_ENDIAN | 38 #define WEBRTC_ARCH_LITTLE_ENDIAN |
| 44 #elif defined(__MIPSEL__) | 39 #elif defined(__MIPSEL__) |
| 40 #if defined(__LP64__) |
| 41 #define WEBRTC_ARCH_MIPS64_FAMILY |
| 42 #else |
| 43 #define WEBRTC_ARCH_MIPS_FAMILY |
| 44 #endif |
| 45 #define WEBRTC_ARCH_32_BITS | 45 #define WEBRTC_ARCH_32_BITS |
| 46 #define WEBRTC_ARCH_LITTLE_ENDIAN | 46 #define WEBRTC_ARCH_LITTLE_ENDIAN |
| 47 #elif defined(__pnacl__) | 47 #elif defined(__pnacl__) |
| 48 #define WEBRTC_ARCH_32_BITS | 48 #define WEBRTC_ARCH_32_BITS |
| 49 #define WEBRTC_ARCH_LITTLE_ENDIAN | 49 #define WEBRTC_ARCH_LITTLE_ENDIAN |
| 50 #else | 50 #else |
| 51 #error Please add support for your architecture in typedefs.h | 51 #error Please add support for your architecture in typedefs.h |
| 52 #endif | 52 #endif |
| 53 | 53 |
| 54 #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN)) | 54 #if !(defined(WEBRTC_ARCH_LITTLE_ENDIAN) ^ defined(WEBRTC_ARCH_BIG_ENDIAN)) |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 // Annotate a function that will not return control flow to the caller. | 103 // Annotate a function that will not return control flow to the caller. |
| 104 #if defined(_MSC_VER) | 104 #if defined(_MSC_VER) |
| 105 #define NO_RETURN __declspec(noreturn) | 105 #define NO_RETURN __declspec(noreturn) |
| 106 #elif defined(__GNUC__) | 106 #elif defined(__GNUC__) |
| 107 #define NO_RETURN __attribute__((noreturn)) | 107 #define NO_RETURN __attribute__((noreturn)) |
| 108 #else | 108 #else |
| 109 #define NO_RETURN | 109 #define NO_RETURN |
| 110 #endif | 110 #endif |
| 111 | 111 |
| 112 #endif // WEBRTC_TYPEDEFS_H_ | 112 #endif // WEBRTC_TYPEDEFS_H_ |
| OLD | NEW |