]>
git.saurik.com Git - apple/javascriptcore.git/blob - config.h
394bba56a452ba761d05dc50f66ae35c056e5321
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
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.
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.
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.
22 #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
23 #ifdef BUILDING_WITH_CMAKE
24 #include "cmakeconfig.h"
26 #include "autotoolsconfig.h"
30 #include <wtf/Platform.h>
32 /* See note in wtf/Platform.h for more info on EXPORT_MACROS. */
33 #if USE(EXPORT_MACROS)
35 #include <wtf/ExportMacros.h>
37 #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
38 #define WTF_EXPORT_PRIVATE WTF_EXPORT
39 #define JS_EXPORT_PRIVATE WTF_EXPORT
41 #define WTF_EXPORT_PRIVATE WTF_IMPORT
42 #define JS_EXPORT_PRIVATE WTF_IMPORT
45 #define JS_EXPORTDATA JS_EXPORT_PRIVATE
46 #define JS_EXPORTCLASS JS_EXPORT_PRIVATE
48 #else /* !USE(EXPORT_MACROS) */
50 #if !PLATFORM(CHROMIUM) && OS(WINDOWS) && !defined(BUILDING_WX__) && !COMPILER(GCC)
51 #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
52 #define JS_EXPORTDATA __declspec(dllexport)
54 #define JS_EXPORTDATA __declspec(dllimport)
56 #define JS_EXPORTCLASS JS_EXPORTDATA
59 #define JS_EXPORTCLASS
62 #define WTF_EXPORT_PRIVATE
63 #define JS_EXPORT_PRIVATE
65 #endif /* USE(EXPORT_MACROS) */
69 // If we don't define these, they get defined in windef.h.
70 // We want to use std::min and std::max
74 #if !COMPILER(MSVC7_OR_LOWER) && !OS(WINCE)
75 // We need to define this before the first #include of stdlib.h or it won't contain rand_s.
83 #if OS(UNIX) || OS(WINDOWS)
84 #define WTF_USE_OS_RANDOMNESS 1
87 #if OS(FREEBSD) || OS(OPENBSD)
88 #define HAVE_PTHREAD_NP_H 1
91 /* FIXME: if all platforms have these, do they really need #defines? */
92 #define HAVE_STDINT_H 1
99 #include <wtf/FastMalloc.h>
102 // this breaks compilation of <QFontDatabase>, at least, so turn it off for now
103 // Also generates errors on wx on Windows, because these functions
104 // are used from wx headers.
105 #if !PLATFORM(QT) && !PLATFORM(WX)
106 #include <wtf/DisallowCType.h>
110 #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
112 #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
115 #if PLATFORM(CHROMIUM)
116 #if !defined(WTF_USE_V8)
119 #endif /* PLATFORM(CHROMIUM) */
121 #if !defined(WTF_USE_V8)
123 #endif /* !defined(WTF_USE_V8) */
125 /* Using V8 implies not using JSC and vice versa */
126 #define WTF_USE_JSC !WTF_USE_V8