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 #elif defined(WIN32) | 22 #elif defined(_WIN32) |
23 #define OS_WIN 1 | 23 #define OS_WIN 1 |
24 #else | 24 #else |
25 #error Please add support for your platform in build/build_config.h | 25 #error Please add support for your platform in build/build_config.h |
26 #endif | 26 #endif |
27 | 27 |
28 // For access to standard POSIX features, use OS_POSIX instead of a more | 28 // For access to standard POSIX features, use OS_POSIX instead of a more |
29 // specific macro. | 29 // specific macro. |
30 #if defined(OS_MACOSX) || defined(OS_LINUX) | 30 #if defined(OS_MACOSX) || defined(OS_LINUX) |
31 #define OS_POSIX 1 | 31 #define OS_POSIX 1 |
32 #endif | 32 #endif |
(...skipping 27 matching lines...) Expand all Loading... |
60 #define WCHAR_T_IS_UTF16 | 60 #define WCHAR_T_IS_UTF16 |
61 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ | 61 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ |
62 defined(__WCHAR_MAX__) && __WCHAR_MAX__ == 0x7fffffff | 62 defined(__WCHAR_MAX__) && __WCHAR_MAX__ == 0x7fffffff |
63 #define WCHAR_T_IS_UTF32 | 63 #define WCHAR_T_IS_UTF32 |
64 #else | 64 #else |
65 #error Please add support for your compiler in build/build_config.h | 65 #error Please add support for your compiler in build/build_config.h |
66 #endif | 66 #endif |
67 | 67 |
68 #endif // BUILD_BUILD_CONFIG_H_ | 68 #endif // BUILD_BUILD_CONFIG_H_ |
69 | 69 |
OLD | NEW |