| 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(__linux__) | 20 #elif defined(__linux__) |
| 21 #define OS_LINUX 1 | 21 #define OS_LINUX 1 |
| 22 // Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined. | 22 // Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined. |
| 23 #if !defined(TOOLKIT_VIEWS) | 23 #if !defined(TOOLKIT_VIEWS) |
| 24 #define TOOLKIT_GTK | 24 #define TOOLKIT_GTK |
| 25 #endif | 25 #endif |
| 26 #elif defined(_WIN32) | 26 #elif defined(_WIN32) |
| 27 #define OS_WIN 1 | 27 #define OS_WIN 1 |
| 28 #define TOOLKIT_VIEWS 1 | 28 #define TOOLKIT_VIEWS 1 |
| 29 #elif defined(__FreeBSD__) |
| 30 #define OS_FREEBSD 1 |
| 31 #define TOOLKIT_GTK |
| 29 #else | 32 #else |
| 30 #error Please add support for your platform in build/build_config.h | 33 #error Please add support for your platform in build/build_config.h |
| 31 #endif | 34 #endif |
| 32 | 35 |
| 33 // For access to standard POSIX features, use OS_POSIX instead of a more | 36 // For access to standard POSIXish features, use OS_POSIX instead of a |
| 34 // specific macro. | 37 // more specific macro. |
| 35 #if defined(OS_MACOSX) || defined(OS_LINUX) | 38 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) |
| 36 #define OS_POSIX 1 | 39 #define OS_POSIX 1 |
| 37 #endif | 40 #endif |
| 38 | 41 |
| 42 // Use base::DataPack for name/value pairs. |
| 43 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) |
| 44 #define USE_BASE_DATA_PACK 1 |
| 45 #endif |
| 46 |
| 47 // Use NSS for crypto. |
| 48 #if defined(OS_LINUX) || defined(OS_FREEBSD) |
| 49 #define USE_NSS 1 |
| 50 #endif |
| 51 |
| 52 // Use X11 (and hence GTK/GDK) |
| 53 #if defined(OS_LINUX) || defined(OS_FREEBSD) |
| 54 #define USE_X11 1 |
| 55 #endif |
| 56 |
| 39 // Compiler detection. | 57 // Compiler detection. |
| 40 #if defined(__GNUC__) | 58 #if defined(__GNUC__) |
| 41 #define COMPILER_GCC 1 | 59 #define COMPILER_GCC 1 |
| 42 #elif defined(_MSC_VER) | 60 #elif defined(_MSC_VER) |
| 43 #define COMPILER_MSVC 1 | 61 #define COMPILER_MSVC 1 |
| 44 #else | 62 #else |
| 45 #error Please add support for your compiler in build/build_config.h | 63 #error Please add support for your compiler in build/build_config.h |
| 46 #endif | 64 #endif |
| 47 | 65 |
| 48 // Processor architecture detection. For more info on what's defined, see: | 66 // Processor architecture detection. For more info on what's defined, see: |
| (...skipping 22 matching lines...) Expand all Loading... |
| 71 #define WCHAR_T_IS_UTF16 | 89 #define WCHAR_T_IS_UTF16 |
| 72 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ | 90 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ |
| 73 defined(__WCHAR_MAX__) && \ | 91 defined(__WCHAR_MAX__) && \ |
| 74 (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) | 92 (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) |
| 75 #define WCHAR_T_IS_UTF32 | 93 #define WCHAR_T_IS_UTF32 |
| 76 #else | 94 #else |
| 77 #error Please add support for your compiler in build/build_config.h | 95 #error Please add support for your compiler in build/build_config.h |
| 78 #endif | 96 #endif |
| 79 | 97 |
| 80 #endif // BUILD_BUILD_CONFIG_H_ | 98 #endif // BUILD_BUILD_CONFIG_H_ |
| OLD | NEW |