1 /* 2 * Copyright (C) 2008 Nuanti Ltd. 3 * 4 * This library is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU Library General Public 6 * License as published by the Free Software Foundation; either 7 * version 2 of the License, or (at your option) any later version. 8 * 9 * This library is distributed in the hope that it will be useful, 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * Library General Public License for more details. 13 * 14 * You should have received a copy of the GNU Library General Public License 15 * along with this library; see the file COPYING.LIB. If not, write to 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * Boston, MA 02110-1301, USA. 18 * 19 */ 20 21 #define Config_H 22 23 #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H 24 #include "autotoolsconfig.h" 25 #endif 26 27 #include <wtf/Platform.h> 28 29 /* See note in wtf/Platform.h for more info on EXPORT_MACROS. */ 30 #if USE(EXPORT_MACROS) 31 32 #include <wtf/ExportMacros.h> 33 34 #define WTF_EXPORT_PRIVATE WTF_IMPORT 35 #define JS_EXPORT_PRIVATE WTF_IMPORT 36 #define WEBKIT_EXPORTDATA WTF_IMPORT 37 38 #define JS_EXPORTDATA JS_EXPORT_PRIVATE 39 #define JS_EXPORTCLASS JS_EXPORT_PRIVATE 40 41 #else /* !USE(EXPORT_MACROS) */ 42 43 #if OS(WINDOWS) && !COMPILER(GCC) && !defined(BUILDING_WX__) 44 #define JS_EXPORTDATA __declspec(dllimport) 45 #define WEBKIT_EXPORTDATA __declspec(dllimport) 46 #else 47 #define JS_EXPORTDATA 48 #define WEBKIT_EXPORTDATA 49 #endif 50 51 #define WTF_EXPORT_PRIVATE 52 #define JS_EXPORT_PRIVATE 53 54 #endif /* USE(EXPORT_MACROS) */ 55 56 #ifdef __cplusplus 57 #undef new 58 #undef delete 59 #include <wtf/FastMalloc.h> 60 #endif 61 62 #if PLATFORM(MAC) 63 #define WTF_USE_CF 1 64 65 #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 66 #define BUILDING_ON_TIGER 1 67 #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6 68 #define BUILDING_ON_LEOPARD 1 69 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 70 #define BUILDING_ON_SNOW_LEOPARD 1 71 #endif 72 #endif // PLATFORM(MAC) 73 74 #if PLATFORM(WIN) 75 #define WTF_USE_CF 1 76 #if defined(WIN_CAIRO) 77 #define WTF_USE_CAIRO 1 78 #define WTF_USE_CURL 1 79 #else 80 #define WTF_USE_CG 1 81 #define WTF_USE_CFNETWORK 1 82 #endif 83 84 #undef _WIN32_WINNT 85 #define _WIN32_WINNT 0x0500 86 87 #undef WINVER 88 #define WINVER 0x0500 89 90 // If we don't define these, they get defined in windef.h. 91 // We want to use std::min and std::max 92 #undef max 93 #define max max 94 #undef min 95 #define min min 96 97 #undef _WINSOCKAPI_ 98 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h 99 #endif // PLATFORM(WIN) 100