1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/chromium/src/build/build_config.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,122 @@ 1.4 +// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1.5 +// Use of this source code is governed by a BSD-style license that can be 1.6 +// found in the LICENSE file. 1.7 + 1.8 +// This file adds defines about the platform we're currently building on. 1.9 +// Operating System: 1.10 +// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) 1.11 +// Compiler: 1.12 +// COMPILER_MSVC / COMPILER_GCC 1.13 +// Processor: 1.14 +// ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64) 1.15 +// ARCH_CPU_32_BITS / ARCH_CPU_64_BITS 1.16 + 1.17 +#ifndef BUILD_BUILD_CONFIG_H_ 1.18 +#define BUILD_BUILD_CONFIG_H_ 1.19 + 1.20 +// A set of macros to use for platform detection. 1.21 +#if defined(ANDROID) 1.22 +#define OS_ANDROID 1 1.23 +#define OS_LINUX 1 1.24 +#elif defined(__APPLE__) 1.25 +#define OS_MACOSX 1 1.26 +#elif defined(__linux__) 1.27 +#define OS_LINUX 1 1.28 +#elif defined(__DragonFly__) 1.29 +#define OS_DRAGONFLY 1 1.30 +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) 1.31 +#define OS_FREEBSD 1 1.32 +#elif defined(__NetBSD__) 1.33 +#define OS_NETBSD 1 1.34 +#elif defined(__OpenBSD__) 1.35 +#define OS_OPENBSD 1 1.36 +#elif defined(_WIN32) 1.37 +#define OS_WIN 1 1.38 +#else 1.39 +#error Please add support for your platform in build/build_config.h 1.40 +#endif 1.41 + 1.42 +// For access to standard BSD features, use OS_BSD instead of a 1.43 +// more specific macro. 1.44 +#if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \ 1.45 + || defined(OS_NETBSD) || defined(OS_OPENBSD) 1.46 +#define OS_BSD 1 1.47 +#endif 1.48 + 1.49 +// For access to standard POSIX features, use OS_POSIX instead of a more 1.50 +// specific macro. 1.51 +#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) 1.52 +#define OS_POSIX 1 1.53 +#endif 1.54 + 1.55 +// Compiler detection. 1.56 +#if defined(__GNUC__) 1.57 +#define COMPILER_GCC 1 1.58 +#elif defined(_MSC_VER) 1.59 +#define COMPILER_MSVC 1 1.60 +#else 1.61 +#error Please add support for your compiler in build/build_config.h 1.62 +#endif 1.63 + 1.64 +// Processor architecture detection. For more info on what's defined, see: 1.65 +// http://msdn.microsoft.com/en-us/library/b0084kay.aspx 1.66 +// http://www.agner.org/optimize/calling_conventions.pdf 1.67 +// or with gcc, run: "echo | gcc -E -dM -" 1.68 +#if defined(_M_X64) || defined(__x86_64__) 1.69 +#define ARCH_CPU_X86_FAMILY 1 1.70 +#define ARCH_CPU_X86_64 1 1.71 +#define ARCH_CPU_64_BITS 1 1.72 +#elif defined(_M_IX86) || defined(__i386__) 1.73 +#define ARCH_CPU_X86_FAMILY 1 1.74 +#define ARCH_CPU_X86 1 1.75 +#define ARCH_CPU_32_BITS 1 1.76 +#elif defined(__ARMEL__) 1.77 +#define ARCH_CPU_ARM_FAMILY 1 1.78 +#define ARCH_CPU_ARMEL 1 1.79 +#define ARCH_CPU_32_BITS 1 1.80 +#define WCHAR_T_IS_UNSIGNED 1 1.81 +#elif defined(__powerpc64__) 1.82 +#define ARCH_CPU_PPC64 1 1.83 +#define ARCH_CPU_64_BITS 1 1.84 +#elif defined(__ppc__) || defined(__powerpc__) 1.85 +#define ARCH_CPU_PPC 1 1.86 +#define ARCH_CPU_32_BITS 1 1.87 +#elif defined(__sparc64__) 1.88 +#define ARCH_CPU_SPARC 1 1.89 +#define ARCH_CPU_64_BITS 1 1.90 +#elif defined(__sparc__) 1.91 +#define ARCH_CPU_SPARC 1 1.92 +#define ARCH_CPU_32_BITS 1 1.93 +#elif defined(__mips__) 1.94 +#define ARCH_CPU_MIPS 1 1.95 +#define ARCH_CPU_32_BITS 1 1.96 +#elif defined(__hppa__) 1.97 +#define ARCH_CPU_HPPA 1 1.98 +#define ARCH_CPU_32_BITS 1 1.99 +#elif defined(__ia64__) 1.100 +#define ARCH_CPU_IA64 1 1.101 +#define ARCH_CPU_64_BITS 1 1.102 +#elif defined(__s390x__) 1.103 +#define ARCH_CPU_S390X 1 1.104 +#define ARCH_CPU_64_BITS 1 1.105 +#elif defined(__s390__) 1.106 +#define ARCH_CPU_S390 1 1.107 +#define ARCH_CPU_32_BITS 1 1.108 +#elif defined(__alpha__) 1.109 +#define ARCH_CPU_ALPHA 1 1.110 +#define ARCH_CPU_64_BITS 1 1.111 +#elif defined(__aarch64__) 1.112 +#define ARCH_CPU_AARCH64 1 1.113 +#define ARCH_CPU_64_BITS 1 1.114 +#else 1.115 +#error Please add support for your architecture in build/build_config.h 1.116 +#endif 1.117 + 1.118 +// Type detection for wchar_t. 1.119 +#if defined(OS_WIN) 1.120 +#define WCHAR_T_IS_UTF16 1.121 +#else 1.122 +#define WCHAR_T_IS_UTF32 1.123 +#endif 1.124 + 1.125 +#endif // BUILD_BUILD_CONFIG_H_