source: webkit/trunk/Source/JavaScriptCore/config.h@ 101198

Last change on this file since 101198 was 101198, checked in by [email protected], 13 years ago

Needs WTF_INLINE and JS_INLINE
https://bugs.webkit.org/show_bug.cgi?id=72853

Patch by Hajime Morrita <[email protected]> on 2011-11-26
Reviewed by Kevin Ollivier.

Added WTF_HIDDEN, WTF_INLINE and JS_INLINE which
indirect attribute((visibility("hidden"))

  • config.h:
  • wtf/ExportMacros.h:
  • Property svn:eol-style set to native
File size: 3.6 KB
Line 
1/*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <[email protected]>
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 *
15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19 *
20 */
21
22#if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
23#ifdef BUILDING_WITH_CMAKE
24#include "cmakeconfig.h"
25#else
26#include "autotoolsconfig.h"
27#endif
28#endif
29
30#include <wtf/Platform.h>
31
32/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */
33#if USE(EXPORT_MACROS)
34
35#include <wtf/ExportMacros.h>
36
37#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
38#define WTF_EXPORT_PRIVATE WTF_EXPORT
39#define WTF_EXPORT_HIDDEN WTF_HIDDEN
40#define JS_EXPORT_PRIVATE WTF_EXPORT
41#define JS_EXPORT_HIDDEN WTF_HIDDEN
42#else
43#define WTF_EXPORT_PRIVATE WTF_IMPORT
44#define WTF_EXPORT_HIDDEN
45#define JS_EXPORT_PRIVATE WTF_IMPORT
46#define JS_EXPORT_HIDDEN
47#endif
48
49#define JS_EXPORTDATA JS_EXPORT_PRIVATE
50#define JS_EXPORTCLASS JS_EXPORT_PRIVATE
51
52#else /* !USE(EXPORT_MACROS) */
53
54#if !PLATFORM(CHROMIUM) && OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
55#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
56#define JS_EXPORTDATA __declspec(dllexport)
57#else
58#define JS_EXPORTDATA __declspec(dllimport)
59#endif
60#define JS_EXPORTCLASS JS_EXPORTDATA
61#else
62#define JS_EXPORTDATA
63#define JS_EXPORTCLASS
64#endif
65
66#define WTF_EXPORT_PRIVATE
67#define WTF_EXPORT_HIDDEN
68#define JS_EXPORT_PRIVATE
69#define JS_EXPORT_HIDDEN
70
71#endif /* USE(EXPORT_MACROS) */
72
73#define WTF_INLINE WTF_EXPORT_HIDDEN inline
74#define JS_INLINE JS_EXPORT_HIDDEN inline
75
76#if OS(WINDOWS)
77
78#ifndef _WIN32_WINNT
79#define _WIN32_WINNT 0x0500
80#endif
81
82#ifndef WINVER
83#define WINVER 0x0500
84#endif
85
86// If we don't define these, they get defined in windef.h.
87// We want to use std::min and std::max
88#define max max
89#define min min
90
91#if !COMPILER(MSVC7_OR_LOWER) && !OS(WINCE)
92// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
93#ifndef _CRT_RAND_S
94#define _CRT_RAND_S
95#endif
96#endif
97
98#endif
99
100#if OS(UNIX) || OS(WINDOWS)
101#define WTF_USE_OS_RANDOMNESS 1
102#endif
103
104#if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__)
105#define HAVE_PTHREAD_NP_H 1
106#endif
107
108/* FIXME: if all platforms have these, do they really need #defines? */
109#define HAVE_STDINT_H 1
110
111#define WTF_CHANGES 1
112
113#ifdef __cplusplus
114#undef new
115#undef delete
116#include <wtf/FastMalloc.h>
117#endif
118
119// this breaks compilation of <QFontDatabase>, at least, so turn it off for now
120// Also generates errors on wx on Windows and QNX, because these functions
121// are used from wx and QNX headers.
122#if !PLATFORM(QT) && !PLATFORM(WX) && !OS(QNX)
123#include <wtf/DisallowCType.h>
124#endif
125
126#if COMPILER(MSVC)
127#define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
128#else
129#define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
130#endif
131
132#if PLATFORM(CHROMIUM)
133#if !defined(WTF_USE_V8)
134#define WTF_USE_V8 1
135#endif
136#endif /* PLATFORM(CHROMIUM) */
137
138#if !defined(WTF_USE_V8)
139#define WTF_USE_V8 0
140#endif /* !defined(WTF_USE_V8) */
141
142/* Using V8 implies not using JSC and vice versa */
143#define WTF_USE_JSC !WTF_USE_V8
Note: See TracBrowser for help on using the repository browser.