Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef LulPlatformMacros_h
8 #define LulPlatformMacros_h
10 #include <stdint.h>
11 #include <stdlib.h>
13 // Define platform selection macros in a consistent way. The primary
14 // factorisation is on (ARCH,OS) pairs ("PLATforms") but ARCH_ and OS_
15 // macros are defined too, since they are sometimes convenient.
17 #undef LUL_PLAT_x64_linux
18 #undef LUL_PLAT_x86_linux
19 #undef LUL_PLAT_arm_android
20 #undef LUL_PLAT_x86_android
22 #undef LUL_ARCH_arm
23 #undef LUL_ARCH_x86
24 #undef LUL_ARCH_x64
26 #undef LUL_OS_android
27 #undef LUL_OS_linux
29 #if defined(__linux__) && defined(__x86_64__)
30 # define LUL_PLAT_x64_linux 1
31 # define LUL_ARCH_x64 1
32 # define LUL_OS_linux 1
34 #elif defined(__linux__) && defined(__i386__) && !defined(__ANDROID__)
35 # define LUL_PLAT_x86_linux 1
36 # define LUL_ARCH_x86 1
37 # define LUL_OS_linux 1
39 #elif defined(__ANDROID__) && defined(__arm__)
40 # define LUL_PLAT_arm_android 1
41 # define LUL_ARCH_arm 1
42 # define LUL_OS_android 1
44 #elif defined(__ANDROID__) && defined(__i386__)
45 # define LUL_PLAT_x86_android 1
46 # define LUL_ARCH_x86 1
47 # define LUL_OS_android 1
49 #else
50 # error "Unsupported platform"
51 #endif
53 #endif // LulPlatformMacros_h