[Release] Webkit-EFL Ver. 2.0_beta_118996_0.6.22
[framework/web/webkit-efl.git] / Source / WebKit2 / config.h
1 /*
2  * Copyright (C) 2010 Apple Inc. All rights reserved.
3  * Portions Copyright (c) 2010 Motorola Mobility, Inc.  All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions and the following disclaimer.
10  * 2. Redistributions in binary form must reproduce the above copyright
11  *    notice, this list of conditions and the following disclaimer in the
12  *    documentation and/or other materials provided with the distribution.
13  *
14  * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
15  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
16  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
18  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
24  * THE POSSIBILITY OF SUCH DAMAGE.
25  */ 
26
27 #if defined (BUILDING_GTK__)
28 #include "autotoolsconfig.h"
29 #endif /* defined (BUILDING_GTK__) */
30
31 #if defined (BUILDING_WITH_CMAKE)
32 #include "cmakeconfig.h"
33 #endif
34
35 #include <wtf/DisallowCType.h>
36 #include <wtf/Platform.h>
37 #include <wtf/ExportMacros.h>
38 #if USE(JSC)
39 #include <runtime/JSExportMacros.h>
40 #endif
41
42 #ifdef __cplusplus
43 #ifndef EXTERN_C_BEGIN
44 #define EXTERN_C_BEGIN extern "C" {
45 #endif
46 #ifndef EXTERN_C_END
47 #define EXTERN_C_END }
48 #endif
49 #else
50 #define EXTERN_C_BEGIN
51 #define EXTERN_C_END
52 #endif
53
54 #if ENABLE(TIZEN_WEBKIT2_REMOTE_WEB_INSPECTOR)
55 #if OS(UNIX) || OS(WINDOWS)
56 #define WTF_USE_OS_RANDOMNESS 1
57 #endif
58 #endif
59
60 // For defining getters to a static value, where the getters have internal linkage
61 #define DEFINE_STATIC_GETTER(type, name, arguments) \
62 static const type& name() \
63 { \
64     DEFINE_STATIC_LOCAL(type, name##Value, arguments); \
65     return name##Value; \
66 }
67
68 #if PLATFORM(MAC)
69
70 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
71 #define ENABLE_WEB_PROCESS_SANDBOX 1
72 #endif
73
74 #if ENABLE(NETSCAPE_PLUGIN_API)
75 #define ENABLE_PLUGIN_PROCESS 1
76 #endif
77
78 #if PLATFORM(MAC)
79 #define ENABLE_MEMORY_SAMPLER 1
80 #endif
81
82 #import <CoreGraphics/CoreGraphics.h>
83
84 #ifdef __OBJC__
85 #import <Cocoa/Cocoa.h>
86 #endif
87
88
89 #include <WebCore/EmptyProtocolDefinitions.h>
90
91 #elif defined(WIN32) || defined(_WIN32)
92
93 #ifndef _WIN32_WINNT
94 #define _WIN32_WINNT 0x0500
95 #endif
96
97 #ifndef WINVER
98 #define WINVER 0x0500
99 #endif
100
101 /* If we don't define these, they get defined in windef.h. */
102 /* We want to use std::min and std::max. */
103 #ifndef max
104 #define max max
105 #endif
106 #ifndef min
107 #define min min
108 #endif
109
110 #ifndef _WINSOCKAPI_
111 #define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
112 #endif
113
114 #include <WebCore/config.h>
115 #include <windows.h>
116
117 #if USE(CG)
118 #include <CoreGraphics/CoreGraphics.h>
119 #endif
120
121 #endif /* defined(WIN32) || defined(_WIN32) */
122
123 #ifdef __cplusplus
124
125 // These undefs match up with defines in WebKit2Prefix.h for Mac OS X.
126 // Helps us catch if anyone uses new or delete by accident in code and doesn't include "config.h".
127 #undef new
128 #undef delete
129 #include <wtf/FastMalloc.h>
130
131 #endif
132
133 #ifndef PLUGIN_ARCHITECTURE_UNSUPPORTED
134 #if PLATFORM(MAC)
135 #define PLUGIN_ARCHITECTURE_MAC 1
136 #elif PLATFORM(WIN)
137 #define PLUGIN_ARCHITECTURE_WIN 1
138 #elif (PLATFORM(GTK) || PLATFORM(EFL))&& (OS(UNIX) && !OS(MAC_OS_X))
139 #define PLUGIN_ARCHITECTURE_X11 1
140 #else
141 #define PLUGIN_ARCHITECTURE_UNSUPPORTED 1
142 #endif
143 #endif
144
145 #define PLUGIN_ARCHITECTURE(ARCH) (defined PLUGIN_ARCHITECTURE_##ARCH && PLUGIN_ARCHITECTURE_##ARCH)
146
147 #ifndef ENABLE_INSPECTOR_SERVER
148 #if PLATFORM(QT)
149 #define ENABLE_INSPECTOR_SERVER 1
150 #endif
151 #endif