| OLD | NEW |
| 1 /* | 1 // TODO(abarth): Remove this file. |
| 2 * Copyright (C) 2004, 2005, 2006, 2013 Apple Inc. | |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | |
| 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. | |
| 5 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. | |
| 6 * | |
| 7 * This library is free software; you can redistribute it and/or | |
| 8 * modify it under the terms of the GNU Library General Public | |
| 9 * License as published by the Free Software Foundation; either | |
| 10 * version 2 of the License, or (at your option) any later version. | |
| 11 * | |
| 12 * This library is distributed in the hope that it will be useful, | |
| 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
| 15 * Library General Public License for more details. | |
| 16 * | |
| 17 * You should have received a copy of the GNU Library General Public License | |
| 18 * along with this library; see the file COPYING.LIB. If not, write to | |
| 19 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | |
| 20 * Boston, MA 02110-1301, USA. | |
| 21 * | |
| 22 */ | |
| 23 | |
| 24 /* Include compiler specific macros */ | |
| 25 #include "sky/engine/wtf/Compiler.h" | |
| 26 | |
| 27 /* ==== Platform adaptation macros: these describe properties of the target envi
ronment. ==== */ | |
| 28 | |
| 29 /* HAVE() - specific system features (headers, functions or similar) that are pr
esent or not */ | |
| 30 #define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE) | |
| 31 /* OS() - underlying operating system; only to be used for mandated low-level se
rvices like | |
| 32 virtual memory, not to choose a GUI toolkit */ | |
| 33 #define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE) | |
| 34 | |
| 35 /* ==== Policy decision macros: these define policy choices for a particular por
t. ==== */ | |
| 36 | |
| 37 /* USE() - use a particular third-party library or optional OS service */ | |
| 38 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATUR
E) | |
| 39 /* ENABLE() - turn on a specific feature of WebKit */ | |
| 40 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATU
RE) | |
| 41 | |
| 42 /* ==== OS() - underlying operating system; only to be used for mandated low-lev
el services like | |
| 43 virtual memory, not to choose a GUI toolkit ==== */ | |
| 44 | |
| 45 /* OS(ANDROID) - Android */ | |
| 46 #ifdef ANDROID | |
| 47 #define WTF_OS_ANDROID 1 | |
| 48 /* OS(LINUX) - Linux */ | |
| 49 #elif defined(__linux__) | |
| 50 #define WTF_OS_LINUX 1 | |
| 51 #endif | |
| 52 | |
| 53 /* Always OS(POSIX) */ | |
| 54 #define WTF_OS_POSIX 1 | |
| 55 | |
| 56 #ifdef __APPLE__ | |
| 57 /* OS(MACOSX) - Mac and iOS */ | |
| 58 #define WTF_OS_MACOSX 1 | |
| 59 #include <TargetConditionals.h> | |
| 60 #if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR | |
| 61 /* OS(IOS) - iOS */ | |
| 62 #define WTF_OS_IOS 1 | |
| 63 #endif | |
| 64 #endif /* __APPLE__ */ | |
| 65 | |
| 66 /* Operating environments */ | |
| 67 | |
| 68 #if OS(ANDROID) | |
| 69 #define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1 | |
| 70 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1 | |
| 71 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1 | |
| 72 #else | |
| 73 #define WTF_USE_ICCJPEG 1 | |
| 74 #define WTF_USE_QCMSLIB 1 | |
| 75 #endif | |
| 76 | |
| 77 #if OS(POSIX) | |
| 78 #define HAVE_SIGNAL_H 1 | |
| 79 #define HAVE_SYS_TIME_H 1 | |
| 80 #define WTF_USE_PTHREADS 1 | |
| 81 #endif | |
| 82 | |
| 83 #if !OS(ANDROID) | |
| 84 #define HAVE_TM_GMTOFF 1 | |
| 85 #define HAVE_TM_ZONE 1 | |
| 86 #define HAVE_TIMEGM 1 | |
| 87 #endif | |
| 88 | |
| 89 #ifdef __cplusplus | |
| 90 | |
| 91 // Helps us catch if anyone uses new or delete by accident in code and doesn't i
nclude "config.h". | |
| 92 #undef new | |
| 93 #undef delete | |
| 94 #include <ciso646> | |
| 95 #include <cstddef> | |
| 96 | |
| 97 #endif | |
| OLD | NEW |