| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2013 Apple Inc. | 2 * Copyright (C) 2004, 2005, 2006, 2013 Apple Inc. |
| 3 * Copyright (C) 2009 Google Inc. All rights reserved. | 3 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. | 4 * Copyright (C) 2007-2009 Torch Mobile, Inc. |
| 5 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. | 5 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATUR
E) | 42 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATUR
E) |
| 43 /* ENABLE() - turn on a specific feature of WebKit */ | 43 /* ENABLE() - turn on a specific feature of WebKit */ |
| 44 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATU
RE) | 44 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATU
RE) |
| 45 | 45 |
| 46 /* ==== OS() - underlying operating system; only to be used for mandated low-lev
el services like | 46 /* ==== OS() - underlying operating system; only to be used for mandated low-lev
el services like |
| 47 virtual memory, not to choose a GUI toolkit ==== */ | 47 virtual memory, not to choose a GUI toolkit ==== */ |
| 48 | 48 |
| 49 /* OS(ANDROID) - Android */ | 49 /* OS(ANDROID) - Android */ |
| 50 #ifdef ANDROID | 50 #ifdef ANDROID |
| 51 #define WTF_OS_ANDROID 1 | 51 #define WTF_OS_ANDROID 1 |
| 52 /* OS(MACOSX) - Any Darwin-based OS, including Mac OS X and iPhone OS */ | |
| 53 #elif defined(__APPLE__) | |
| 54 #define WTF_OS_MACOSX 1 | |
| 55 /* OS(FREEBSD) - FreeBSD */ | |
| 56 #elif defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel
__) | |
| 57 #define WTF_OS_FREEBSD 1 | |
| 58 /* OS(LINUX) - Linux */ | 52 /* OS(LINUX) - Linux */ |
| 59 #elif defined(__linux__) | 53 #elif defined(__linux__) |
| 60 #define WTF_OS_LINUX 1 | 54 #define WTF_OS_LINUX 1 |
| 61 /* OS(OPENBSD) - OpenBSD */ | |
| 62 #elif defined(__OpenBSD__) | |
| 63 #define WTF_OS_OPENBSD 1 | |
| 64 /* OS(WIN) - Any version of Windows */ | |
| 65 #elif defined(WIN32) || defined(_WIN32) | |
| 66 #define WTF_OS_WIN 1 | |
| 67 #endif | 55 #endif |
| 68 | 56 |
| 69 /* OS(POSIX) - Any Unix-like system */ | 57 /* Always OS(POSIX) */ |
| 70 #if OS(ANDROID) \ | |
| 71 || OS(MACOSX) \ | |
| 72 || OS(FREEBSD) \ | |
| 73 || OS(LINUX) \ | |
| 74 || OS(OPENBSD) \ | |
| 75 || defined(unix) \ | |
| 76 || defined(__unix) \ | |
| 77 || defined(__unix__) | |
| 78 #define WTF_OS_POSIX 1 | 58 #define WTF_OS_POSIX 1 |
| 79 #endif | |
| 80 | |
| 81 /* There is an assumption in the project that either OS(WIN) or OS(POSIX) is set
. */ | |
| 82 #if !OS(WIN) && !OS(POSIX) | |
| 83 #error Either OS(WIN) or OS(POSIX) needs to be set. | |
| 84 #endif | |
| 85 | 59 |
| 86 /* Operating environments */ | 60 /* Operating environments */ |
| 87 | 61 |
| 88 #if OS(ANDROID) | 62 #if OS(ANDROID) |
| 89 #define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1 | 63 #define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1 |
| 90 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1 | 64 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1 |
| 91 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1 | 65 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1 |
| 92 #else | 66 #else |
| 93 #define WTF_USE_ICCJPEG 1 | 67 #define WTF_USE_ICCJPEG 1 |
| 94 #define WTF_USE_QCMSLIB 1 | 68 #define WTF_USE_QCMSLIB 1 |
| 95 #endif | 69 #endif |
| 96 | 70 |
| 97 #if OS(MACOSX) | |
| 98 #define WTF_USE_CF 1 | |
| 99 #endif /* OS(MACOSX) */ | |
| 100 | |
| 101 #if OS(POSIX) | 71 #if OS(POSIX) |
| 102 #define HAVE_SIGNAL_H 1 | 72 #define HAVE_SIGNAL_H 1 |
| 103 #define HAVE_SYS_TIME_H 1 | 73 #define HAVE_SYS_TIME_H 1 |
| 104 #define WTF_USE_PTHREADS 1 | 74 #define WTF_USE_PTHREADS 1 |
| 105 #endif /* OS(POSIX) */ | 75 #endif |
| 106 | 76 |
| 107 #if !OS(WIN) && !OS(ANDROID) | 77 #if !OS(ANDROID) |
| 108 #define HAVE_TM_GMTOFF 1 | 78 #define HAVE_TM_GMTOFF 1 |
| 109 #define HAVE_TM_ZONE 1 | 79 #define HAVE_TM_ZONE 1 |
| 110 #define HAVE_TIMEGM 1 | 80 #define HAVE_TIMEGM 1 |
| 111 #endif | 81 #endif |
| 112 | 82 |
| 113 #if OS(MACOSX) | |
| 114 #define WTF_USE_NEW_THEME 1 | |
| 115 #endif /* OS(MACOSX) */ | |
| 116 | |
| 117 #if OS(WIN) | |
| 118 | |
| 119 // If we don't define these, they get defined in windef.h. | |
| 120 // We want to use std::min and std::max. | |
| 121 #ifndef max | |
| 122 #define max max | |
| 123 #endif | |
| 124 #ifndef min | |
| 125 #define min min | |
| 126 #endif | |
| 127 | |
| 128 #endif /* OS(WIN) */ | |
| 129 | |
| 130 #ifdef __cplusplus | 83 #ifdef __cplusplus |
| 131 | 84 |
| 132 // These undefs match up with defines in build/mac/Prefix.h for Mac OS X. | |
| 133 // Helps us catch if anyone uses new or delete by accident in code and doesn't i
nclude "config.h". | 85 // Helps us catch if anyone uses new or delete by accident in code and doesn't i
nclude "config.h". |
| 134 #undef new | 86 #undef new |
| 135 #undef delete | 87 #undef delete |
| 136 #include <ciso646> | 88 #include <ciso646> |
| 137 #include <cstddef> | 89 #include <cstddef> |
| 138 | 90 |
| 139 #endif | 91 #endif |
| OLD | NEW |