| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file adds defines about the platform we're currently building on. | 5 // This file adds defines about the platform we're currently building on. |
| 6 // Operating System: | 6 // Operating System: |
| 7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) | 7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) |
| 8 // Compiler: | 8 // Compiler: |
| 9 // COMPILER_MSVC / COMPILER_GCC | 9 // COMPILER_MSVC / COMPILER_GCC |
| 10 // Processor: | 10 // Processor: |
| 11 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) | 11 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) |
| 12 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS | 12 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS |
| 13 | 13 |
| 14 #ifndef BUILD_BUILD_CONFIG_H_ | 14 #ifndef BUILD_BUILD_CONFIG_H_ |
| 15 #define BUILD_BUILD_CONFIG_H_ | 15 #define BUILD_BUILD_CONFIG_H_ |
| 16 | 16 |
| 17 // A set of macros to use for platform detection. | 17 // A set of macros to use for platform detection. |
| 18 #if defined(__APPLE__) | 18 #if defined(__APPLE__) |
| 19 #define OS_MACOSX 1 | 19 #define OS_MACOSX 1 |
| 20 #elif defined(ANDROID) |
| 21 #define OS_ANDROID 1 |
| 20 #elif defined(__native_client__) | 22 #elif defined(__native_client__) |
| 21 #define OS_NACL 1 | 23 #define OS_NACL 1 |
| 22 #elif defined(__linux__) | 24 #elif defined(__linux__) |
| 23 #define OS_LINUX 1 | 25 #define OS_LINUX 1 |
| 24 // Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined. | 26 // Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined. |
| 25 #if !defined(TOOLKIT_VIEWS) | 27 #if !defined(TOOLKIT_VIEWS) |
| 26 #define TOOLKIT_GTK | 28 #define TOOLKIT_GTK |
| 27 #endif | 29 #endif |
| 28 #elif defined(_WIN32) | 30 #elif defined(_WIN32) |
| 29 #define OS_WIN 1 | 31 #define OS_WIN 1 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 41 #error Please add support for your platform in build/build_config.h | 43 #error Please add support for your platform in build/build_config.h |
| 42 #endif | 44 #endif |
| 43 | 45 |
| 44 // A flag derived from the above flags, used to cover GTK code in | 46 // A flag derived from the above flags, used to cover GTK code in |
| 45 // both TOOLKIT_GTK and TOOLKIT_VIEWS. | 47 // both TOOLKIT_GTK and TOOLKIT_VIEWS. |
| 46 #if defined(TOOLKIT_GTK) || (defined(TOOLKIT_VIEWS) && !defined(OS_WIN)) | 48 #if defined(TOOLKIT_GTK) || (defined(TOOLKIT_VIEWS) && !defined(OS_WIN)) |
| 47 #define TOOLKIT_USES_GTK 1 | 49 #define TOOLKIT_USES_GTK 1 |
| 48 #endif | 50 #endif |
| 49 | 51 |
| 50 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) || \ | 52 #if defined(OS_LINUX) || defined(OS_FREEBSD) || defined(OS_OPENBSD) || \ |
| 51 defined(OS_SOLARIS) | 53 defined(OS_SOLARIS) || defined(OS_ANDROID) |
| 52 #if !defined(USE_OPENSSL) | 54 #if !defined(USE_OPENSSL) |
| 53 #define USE_NSS 1 // Default to use NSS for crypto, unless OpenSSL is chosen. | 55 #define USE_NSS 1 // Default to use NSS for crypto, unless OpenSSL is chosen. |
| 54 #endif | 56 #endif |
| 57 #ifndef OS_ANDROID |
| 55 #define USE_X11 1 // Use X for graphics. | 58 #define USE_X11 1 // Use X for graphics. |
| 56 #endif | 59 #endif |
| 60 #endif |
| 57 | 61 |
| 58 #if defined(USE_OPENSSL) && defined(USE_NSS) | 62 #if defined(USE_OPENSSL) && defined(USE_NSS) |
| 59 #error Cannot use both OpenSSL and NSS | 63 #error Cannot use both OpenSSL and NSS |
| 60 #endif | 64 #endif |
| 61 | 65 |
| 62 // For access to standard POSIXish features, use OS_POSIX instead of a | 66 // For access to standard POSIXish features, use OS_POSIX instead of a |
| 63 // more specific macro. | 67 // more specific macro. |
| 64 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \ | 68 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \ |
| 65 defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_NACL) | 69 defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \ |
| 70 defined(OS_NACL) |
| 66 #define OS_POSIX 1 | 71 #define OS_POSIX 1 |
| 67 // Use base::DataPack for name/value pairs. | 72 // Use base::DataPack for name/value pairs. |
| 68 #define USE_BASE_DATA_PACK 1 | 73 #define USE_BASE_DATA_PACK 1 |
| 69 #endif | 74 #endif |
| 70 | 75 |
| 71 // Use tcmalloc | 76 // Use tcmalloc |
| 72 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_TCMALLOC) | 77 #if (defined(OS_WIN) || defined(OS_LINUX)) && !defined(NO_TCMALLOC) |
| 73 #define USE_TCMALLOC 1 | 78 #define USE_TCMALLOC 1 |
| 74 #endif | 79 #endif |
| 75 | 80 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 #else | 134 #else |
| 130 #error Please add support for your compiler in build/build_config.h | 135 #error Please add support for your compiler in build/build_config.h |
| 131 #endif | 136 #endif |
| 132 | 137 |
| 133 #if defined(OS_CHROMEOS) | 138 #if defined(OS_CHROMEOS) |
| 134 // Single define to trigger whether CrOS fonts have BCI on. | 139 // Single define to trigger whether CrOS fonts have BCI on. |
| 135 // In that case font sizes/deltas should be adjusted. | 140 // In that case font sizes/deltas should be adjusted. |
| 136 //define CROS_FONTS_USING_BCI | 141 //define CROS_FONTS_USING_BCI |
| 137 #endif | 142 #endif |
| 138 | 143 |
| 144 #if defined(OS_ANDROID) |
| 145 // The compiler thinks std::string::const_iterator and "const char*" are |
| 146 // equivalent types. |
| 147 #define STD_STRING_ITERATOR_IS_CHAR_POINTER |
| 148 // The compiler thinks base::string16::const_iterator and "char16*" are |
| 149 // equivalent types. |
| 150 #define BASE_STRING16_ITERATOR_IS_CHAR16_POINTER |
| 151 #endif |
| 152 |
| 139 #endif // BUILD_BUILD_CONFIG_H_ | 153 #endif // BUILD_BUILD_CONFIG_H_ |
| OLD | NEW |