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

Last change on this file since 94470 was 93465, checked in by [email protected], 14 years ago

Don't include DisallowCType.h when building on QNX
https://bugs.webkit.org/show_bug.cgi?id=66616

Reviewed by Antonio Gomes.

  • config.h:
  • Property svn:eol-style set to native
File size: 3.4 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 JS_EXPORT_PRIVATE WTF_EXPORT
40#else
41#define WTF_EXPORT_PRIVATE WTF_IMPORT
42#define JS_EXPORT_PRIVATE WTF_IMPORT
43#endif
44
45#define JS_EXPORTDATA JS_EXPORT_PRIVATE
46#define JS_EXPORTCLASS JS_EXPORT_PRIVATE
47
48#else /* !USE(EXPORT_MACROS) */
49
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)
53#else
54#define JS_EXPORTDATA __declspec(dllimport)
55#endif
56#define JS_EXPORTCLASS JS_EXPORTDATA
57#else
58#define JS_EXPORTDATA
59#define JS_EXPORTCLASS
60#endif
61
62#define WTF_EXPORT_PRIVATE
63#define JS_EXPORT_PRIVATE
64
65#endif /* USE(EXPORT_MACROS) */
66
67#if OS(WINDOWS)
68
69#ifndef _WIN32_WINNT
70#define _WIN32_WINNT 0x0500
71#endif
72
73#ifndef WINVER
74#define WINVER 0x0500
75#endif
76
77// If we don't define these, they get defined in windef.h.
78// We want to use std::min and std::max
79#define max max
80#define min min
81
82#if !COMPILER(MSVC7_OR_LOWER) && !OS(WINCE)
83// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
84#ifndef _CRT_RAND_S
85#define _CRT_RAND_S
86#endif
87#endif
88
89#endif
90
91#if OS(UNIX) || OS(WINDOWS)
92#define WTF_USE_OS_RANDOMNESS 1
93#endif
94
95#if OS(FREEBSD) || OS(OPENBSD)
96#define HAVE_PTHREAD_NP_H 1
97#endif
98
99/* FIXME: if all platforms have these, do they really need #defines? */
100#define HAVE_STDINT_H 1
101
102#define WTF_CHANGES 1
103
104#ifdef __cplusplus
105#undef new
106#undef delete
107#include <wtf/FastMalloc.h>
108#endif
109
110// this breaks compilation of <QFontDatabase>, at least, so turn it off for now
111// Also generates errors on wx on Windows and QNX, because these functions
112// are used from wx and QNX headers.
113#if !PLATFORM(QT) && !PLATFORM(WX) && !OS(QNX)
114#include <wtf/DisallowCType.h>
115#endif
116
117#if COMPILER(MSVC)
118#define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
119#else
120#define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
121#endif
122
123#if PLATFORM(CHROMIUM)
124#if !defined(WTF_USE_V8)
125#define WTF_USE_V8 1
126#endif
127#endif /* PLATFORM(CHROMIUM) */
128
129#if !defined(WTF_USE_V8)
130#define WTF_USE_V8 0
131#endif /* !defined(WTF_USE_V8) */
132
133/* Using V8 implies not using JSC and vice versa */
134#define WTF_USE_JSC !WTF_USE_V8
Note: See TracBrowser for help on using the repository browser.