Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: build/build_config.h

Issue 118469: compile on openbsd: mostly ifdefs and missing includes,... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« base/clipboard.h ('K') | « base/time_posix.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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(__OpenBSD__)
27 #define OS_OPENBSD 1
tony 2009/06/10 18:42:04 This should probably be OS_BSD. It would be nice
28 // Use TOOLKIT_GTK on OpenBSD if TOOLKIT_VIEWS isn't defined.
29 #if !defined(TOOLKIT_VIEWS)
30 #define TOOLKIT_GTK
31 #endif
26 #elif defined(_WIN32) 32 #elif defined(_WIN32)
27 #define OS_WIN 1 33 #define OS_WIN 1
28 #define TOOLKIT_VIEWS 1 34 #define TOOLKIT_VIEWS 1
29 #else 35 #else
30 #error Please add support for your platform in build/build_config.h 36 #error Please add support for your platform in build/build_config.h
31 #endif 37 #endif
32 38
33 // For access to standard POSIX features, use OS_POSIX instead of a more 39 // For access to standard POSIX features, use OS_POSIX instead of a more
34 // specific macro. 40 // specific macro.
35 #if defined(OS_MACOSX) || defined(OS_LINUX) 41 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_OPENBSD)
36 #define OS_POSIX 1 42 #define OS_POSIX 1
37 #endif 43 #endif
38 44
39 // Compiler detection. 45 // Compiler detection.
40 #if defined(__GNUC__) 46 #if defined(__GNUC__)
41 #define COMPILER_GCC 1 47 #define COMPILER_GCC 1
42 #elif defined(_MSC_VER) 48 #elif defined(_MSC_VER)
43 #define COMPILER_MSVC 1 49 #define COMPILER_MSVC 1
44 #else 50 #else
45 #error Please add support for your compiler in build/build_config.h 51 #error Please add support for your compiler in build/build_config.h
(...skipping 25 matching lines...) Expand all
71 #define WCHAR_T_IS_UTF16 77 #define WCHAR_T_IS_UTF16
72 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \ 78 #elif defined(OS_POSIX) && defined(COMPILER_GCC) && \
73 defined(__WCHAR_MAX__) && \ 79 defined(__WCHAR_MAX__) && \
74 (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff) 80 (__WCHAR_MAX__ == 0x7fffffff || __WCHAR_MAX__ == 0xffffffff)
75 #define WCHAR_T_IS_UTF32 81 #define WCHAR_T_IS_UTF32
76 #else 82 #else
77 #error Please add support for your compiler in build/build_config.h 83 #error Please add support for your compiler in build/build_config.h
78 #endif 84 #endif
79 85
80 #endif // BUILD_BUILD_CONFIG_H_ 86 #endif // BUILD_BUILD_CONFIG_H_
OLDNEW
« base/clipboard.h ('K') | « base/time_posix.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698