ipc/chromium/src/build/build_config.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
michael@0 2 // Use of this source code is governed by a BSD-style license that can be
michael@0 3 // found in the LICENSE file.
michael@0 4
michael@0 5 // This file adds defines about the platform we're currently building on.
michael@0 6 // Operating System:
michael@0 7 // OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
michael@0 8 // Compiler:
michael@0 9 // COMPILER_MSVC / COMPILER_GCC
michael@0 10 // Processor:
michael@0 11 // ARCH_CPU_X86 / ARCH_CPU_X86_64 / ARCH_CPU_X86_FAMILY (X86 or X86_64)
michael@0 12 // ARCH_CPU_32_BITS / ARCH_CPU_64_BITS
michael@0 13
michael@0 14 #ifndef BUILD_BUILD_CONFIG_H_
michael@0 15 #define BUILD_BUILD_CONFIG_H_
michael@0 16
michael@0 17 // A set of macros to use for platform detection.
michael@0 18 #if defined(ANDROID)
michael@0 19 #define OS_ANDROID 1
michael@0 20 #define OS_LINUX 1
michael@0 21 #elif defined(__APPLE__)
michael@0 22 #define OS_MACOSX 1
michael@0 23 #elif defined(__linux__)
michael@0 24 #define OS_LINUX 1
michael@0 25 #elif defined(__DragonFly__)
michael@0 26 #define OS_DRAGONFLY 1
michael@0 27 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
michael@0 28 #define OS_FREEBSD 1
michael@0 29 #elif defined(__NetBSD__)
michael@0 30 #define OS_NETBSD 1
michael@0 31 #elif defined(__OpenBSD__)
michael@0 32 #define OS_OPENBSD 1
michael@0 33 #elif defined(_WIN32)
michael@0 34 #define OS_WIN 1
michael@0 35 #else
michael@0 36 #error Please add support for your platform in build/build_config.h
michael@0 37 #endif
michael@0 38
michael@0 39 // For access to standard BSD features, use OS_BSD instead of a
michael@0 40 // more specific macro.
michael@0 41 #if defined(OS_DRAGONFLY) || defined(OS_FREEBSD) \
michael@0 42 || defined(OS_NETBSD) || defined(OS_OPENBSD)
michael@0 43 #define OS_BSD 1
michael@0 44 #endif
michael@0 45
michael@0 46 // For access to standard POSIX features, use OS_POSIX instead of a more
michael@0 47 // specific macro.
michael@0 48 #if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
michael@0 49 #define OS_POSIX 1
michael@0 50 #endif
michael@0 51
michael@0 52 // Compiler detection.
michael@0 53 #if defined(__GNUC__)
michael@0 54 #define COMPILER_GCC 1
michael@0 55 #elif defined(_MSC_VER)
michael@0 56 #define COMPILER_MSVC 1
michael@0 57 #else
michael@0 58 #error Please add support for your compiler in build/build_config.h
michael@0 59 #endif
michael@0 60
michael@0 61 // Processor architecture detection. For more info on what's defined, see:
michael@0 62 // http://msdn.microsoft.com/en-us/library/b0084kay.aspx
michael@0 63 // http://www.agner.org/optimize/calling_conventions.pdf
michael@0 64 // or with gcc, run: "echo | gcc -E -dM -"
michael@0 65 #if defined(_M_X64) || defined(__x86_64__)
michael@0 66 #define ARCH_CPU_X86_FAMILY 1
michael@0 67 #define ARCH_CPU_X86_64 1
michael@0 68 #define ARCH_CPU_64_BITS 1
michael@0 69 #elif defined(_M_IX86) || defined(__i386__)
michael@0 70 #define ARCH_CPU_X86_FAMILY 1
michael@0 71 #define ARCH_CPU_X86 1
michael@0 72 #define ARCH_CPU_32_BITS 1
michael@0 73 #elif defined(__ARMEL__)
michael@0 74 #define ARCH_CPU_ARM_FAMILY 1
michael@0 75 #define ARCH_CPU_ARMEL 1
michael@0 76 #define ARCH_CPU_32_BITS 1
michael@0 77 #define WCHAR_T_IS_UNSIGNED 1
michael@0 78 #elif defined(__powerpc64__)
michael@0 79 #define ARCH_CPU_PPC64 1
michael@0 80 #define ARCH_CPU_64_BITS 1
michael@0 81 #elif defined(__ppc__) || defined(__powerpc__)
michael@0 82 #define ARCH_CPU_PPC 1
michael@0 83 #define ARCH_CPU_32_BITS 1
michael@0 84 #elif defined(__sparc64__)
michael@0 85 #define ARCH_CPU_SPARC 1
michael@0 86 #define ARCH_CPU_64_BITS 1
michael@0 87 #elif defined(__sparc__)
michael@0 88 #define ARCH_CPU_SPARC 1
michael@0 89 #define ARCH_CPU_32_BITS 1
michael@0 90 #elif defined(__mips__)
michael@0 91 #define ARCH_CPU_MIPS 1
michael@0 92 #define ARCH_CPU_32_BITS 1
michael@0 93 #elif defined(__hppa__)
michael@0 94 #define ARCH_CPU_HPPA 1
michael@0 95 #define ARCH_CPU_32_BITS 1
michael@0 96 #elif defined(__ia64__)
michael@0 97 #define ARCH_CPU_IA64 1
michael@0 98 #define ARCH_CPU_64_BITS 1
michael@0 99 #elif defined(__s390x__)
michael@0 100 #define ARCH_CPU_S390X 1
michael@0 101 #define ARCH_CPU_64_BITS 1
michael@0 102 #elif defined(__s390__)
michael@0 103 #define ARCH_CPU_S390 1
michael@0 104 #define ARCH_CPU_32_BITS 1
michael@0 105 #elif defined(__alpha__)
michael@0 106 #define ARCH_CPU_ALPHA 1
michael@0 107 #define ARCH_CPU_64_BITS 1
michael@0 108 #elif defined(__aarch64__)
michael@0 109 #define ARCH_CPU_AARCH64 1
michael@0 110 #define ARCH_CPU_64_BITS 1
michael@0 111 #else
michael@0 112 #error Please add support for your architecture in build/build_config.h
michael@0 113 #endif
michael@0 114
michael@0 115 // Type detection for wchar_t.
michael@0 116 #if defined(OS_WIN)
michael@0 117 #define WCHAR_T_IS_UTF16
michael@0 118 #else
michael@0 119 #define WCHAR_T_IS_UTF32
michael@0 120 #endif
michael@0 121
michael@0 122 #endif // BUILD_BUILD_CONFIG_H_

mercurial