/opensource.apple.com/source/JavaScriptCore/JavaScriptCore-7534.48/config.h
C++ Header | 151 lines | 109 code | 24 blank | 18 comment | 4 complexity | 5893d1a0b8d093ab24d5980ad1dadc37 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0, BSD-3-Clause, GPL-3.0, MPL-2.0, LGPL-2.0, LGPL-2.1, CC-BY-SA-3.0, IPL-1.0, ISC, AGPL-1.0, AGPL-3.0, JSON, Apache-2.0, 0BSD
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>config.h</title>
- <style type="text/css">
- .enscript-comment { font-style: italic; color: rgb(178,34,34); }
- .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
- .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
- .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
- .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
- .enscript-string { font-weight: bold; color: rgb(188,143,143); }
- .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
- .enscript-type { font-weight: bold; color: rgb(34,139,34); }
- .enscript-highlight { text-decoration: underline; color: 0; }
- </style>
- </head>
- <body id="top">
- <h1 style="margin:8px;" id="f1">config.h <span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
- <hr/>
- <div></div>
- <pre>
- <span class="enscript-comment">/*
- * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * Copyright (C) 2006 Samuel Weinig <<a href="mailto:sam.weinig@gmail.com">sam.weinig@gmail.com</a>>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */</span>
- #<span class="enscript-reference">if</span> <span class="enscript-reference">defined</span>(<span class="enscript-variable-name">HAVE_CONFIG_H</span>) && <span class="enscript-variable-name">HAVE_CONFIG_H</span>
- #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">BUILDING_WITH_CMAKE</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"cmakeconfig.h"</span>
- #<span class="enscript-reference">else</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"autotoolsconfig.h"</span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><wtf/Platform.h></span>
- <span class="enscript-comment">/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */</span>
- #<span class="enscript-reference">if</span> <span class="enscript-variable-name">USE</span>(<span class="enscript-variable-name">EXPORT_MACROS</span>)
- #<span class="enscript-reference">include</span> <span class="enscript-string"><wtf/ExportMacros.h></span>
- #<span class="enscript-reference">if</span> <span class="enscript-reference">defined</span>(<span class="enscript-variable-name">BUILDING_JavaScriptCore</span>) || <span class="enscript-reference">defined</span>(<span class="enscript-variable-name">BUILDING_WTF</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_EXPORT_PRIVATE</span> WTF_EXPORT
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORT_PRIVATE</span> WTF_EXPORT
- #<span class="enscript-reference">else</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_EXPORT_PRIVATE</span> WTF_IMPORT
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORT_PRIVATE</span> WTF_IMPORT
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span> JS_EXPORT_PRIVATE
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTCLASS</span> JS_EXPORT_PRIVATE
- #<span class="enscript-reference">else</span> <span class="enscript-comment">/* !USE(EXPORT_MACROS) */</span>
- #<span class="enscript-reference">if</span> !<span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">CHROMIUM</span>) && <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINDOWS</span>) && !<span class="enscript-reference">defined</span>(<span class="enscript-variable-name">BUILDING_WX__</span>) && !<span class="enscript-variable-name">COMPILER</span>(<span class="enscript-variable-name">GCC</span>)
- #<span class="enscript-reference">if</span> <span class="enscript-reference">defined</span>(<span class="enscript-variable-name">BUILDING_JavaScriptCore</span>) || <span class="enscript-reference">defined</span>(<span class="enscript-variable-name">BUILDING_WTF</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span> __declspec(dllexport)
- #<span class="enscript-reference">else</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span> __declspec(dllimport)
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTCLASS</span> JS_EXPORTDATA
- #<span class="enscript-reference">else</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTCLASS</span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_EXPORT_PRIVATE</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORT_PRIVATE</span>
- #<span class="enscript-reference">endif</span> <span class="enscript-comment">/* USE(EXPORT_MACROS) */</span>
- #<span class="enscript-reference">if</span> <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINDOWS</span>)
- <span class="enscript-comment">// If we don't define these, they get defined in windef.h.
- </span><span class="enscript-comment">// We want to use std::min and std::max
- </span>#<span class="enscript-reference">define</span> <span class="enscript-variable-name">max</span> max
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">min</span> min
- #<span class="enscript-reference">if</span> !<span class="enscript-variable-name">COMPILER</span>(<span class="enscript-variable-name">MSVC7_OR_LOWER</span>) && !<span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINCE</span>)
- <span class="enscript-comment">// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
- </span>#<span class="enscript-reference">ifndef</span> <span class="enscript-variable-name">_CRT_RAND_S</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">_CRT_RAND_S</span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">if</span> <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">UNIX</span>) || <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINDOWS</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_OS_RANDOMNESS</span> 1
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">if</span> <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">FREEBSD</span>) || <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">OPENBSD</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">HAVE_PTHREAD_NP_H</span> 1
- #<span class="enscript-reference">endif</span>
- <span class="enscript-comment">/* FIXME: if all platforms have these, do they really need #defines? */</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">HAVE_STDINT_H</span> 1
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_CHANGES</span> 1
- #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">__cplusplus</span>
- #<span class="enscript-reference">undef</span> <span class="enscript-variable-name">new</span>
- #<span class="enscript-reference">undef</span> <span class="enscript-variable-name">delete</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string"><wtf/FastMalloc.h></span>
- #<span class="enscript-reference">endif</span>
- <span class="enscript-comment">// this breaks compilation of <QFontDatabase>, at least, so turn it off for now
- </span><span class="enscript-comment">// Also generates errors on wx on Windows, because these functions
- </span><span class="enscript-comment">// are used from wx headers.
- </span>#<span class="enscript-reference">if</span> !<span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">QT</span>) && !<span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">WX</span>)
- #<span class="enscript-reference">include</span> <span class="enscript-string"><wtf/DisallowCType.h></span>
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">if</span> <span class="enscript-variable-name">COMPILER</span>(<span class="enscript-variable-name">MSVC</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">SKIP_STATIC_CONSTRUCTORS_ON_MSVC</span> 1
- #<span class="enscript-reference">else</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">SKIP_STATIC_CONSTRUCTORS_ON_GCC</span> 1
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">if</span> <span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">CHROMIUM</span>)
- #<span class="enscript-reference">if</span> !<span class="enscript-reference">defined</span>(<span class="enscript-variable-name">WTF_USE_V8</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_V8</span> 1
- #<span class="enscript-reference">endif</span>
- #<span class="enscript-reference">endif</span> <span class="enscript-comment">/* PLATFORM(CHROMIUM) */</span>
- #<span class="enscript-reference">if</span> !<span class="enscript-reference">defined</span>(<span class="enscript-variable-name">WTF_USE_V8</span>)
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_V8</span> 0
- #<span class="enscript-reference">endif</span> <span class="enscript-comment">/* !defined(WTF_USE_V8) */</span>
- <span class="enscript-comment">/* Using V8 implies not using JSC and vice versa */</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_JSC</span> !WTF_USE_V8
- </pre>
- <hr />
- </body></html>