PageRenderTime 188ms CodeModel.GetById 30ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title>config.h</title>
  6. <style type="text/css">
  7. .enscript-comment { font-style: italic; color: rgb(178,34,34); }
  8. .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
  9. .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
  10. .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
  11. .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
  12. .enscript-string { font-weight: bold; color: rgb(188,143,143); }
  13. .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
  14. .enscript-type { font-weight: bold; color: rgb(34,139,34); }
  15. .enscript-highlight { text-decoration: underline; color: 0; }
  16. </style>
  17. </head>
  18. <body id="top">
  19. <h1 style="margin:8px;" id="f1">config.h&nbsp;&nbsp;&nbsp;<span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
  20. <hr/>
  21. <div></div>
  22. <pre>
  23. <span class="enscript-comment">/*
  24. * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
  25. * Copyright (C) 2006 Samuel Weinig &lt;<a href="mailto:sam.weinig@gmail.com">sam.weinig@gmail.com</a>&gt;
  26. *
  27. * This library is free software; you can redistribute it and/or
  28. * modify it under the terms of the GNU Library General Public
  29. * License as published by the Free Software Foundation; either
  30. * version 2 of the License, or (at your option) any later version.
  31. *
  32. * This library is distributed in the hope that it will be useful,
  33. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  34. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  35. * Library General Public License for more details.
  36. *
  37. * You should have received a copy of the GNU Library General Public License
  38. * along with this library; see the file COPYING.LIB. If not, write to
  39. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  40. * Boston, MA 02110-1301, USA.
  41. *
  42. */</span>
  43. #<span class="enscript-reference">if</span> <span class="enscript-reference">defined</span>(<span class="enscript-variable-name">HAVE_CONFIG_H</span>) &amp;&amp; <span class="enscript-variable-name">HAVE_CONFIG_H</span>
  44. #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">BUILDING_WITH_CMAKE</span>
  45. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;cmakeconfig.h&quot;</span>
  46. #<span class="enscript-reference">else</span>
  47. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;autotoolsconfig.h&quot;</span>
  48. #<span class="enscript-reference">endif</span>
  49. #<span class="enscript-reference">endif</span>
  50. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;wtf/Platform.h&gt;</span>
  51. <span class="enscript-comment">/* See note in wtf/Platform.h for more info on EXPORT_MACROS. */</span>
  52. #<span class="enscript-reference">if</span> <span class="enscript-variable-name">USE</span>(<span class="enscript-variable-name">EXPORT_MACROS</span>)
  53. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;wtf/ExportMacros.h&gt;</span>
  54. #<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>)
  55. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_EXPORT_PRIVATE</span> WTF_EXPORT
  56. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORT_PRIVATE</span> WTF_EXPORT
  57. #<span class="enscript-reference">else</span>
  58. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_EXPORT_PRIVATE</span> WTF_IMPORT
  59. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORT_PRIVATE</span> WTF_IMPORT
  60. #<span class="enscript-reference">endif</span>
  61. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span> JS_EXPORT_PRIVATE
  62. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTCLASS</span> JS_EXPORT_PRIVATE
  63. #<span class="enscript-reference">else</span> <span class="enscript-comment">/* !USE(EXPORT_MACROS) */</span>
  64. #<span class="enscript-reference">if</span> !<span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">CHROMIUM</span>) &amp;&amp; <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINDOWS</span>) &amp;&amp; !<span class="enscript-reference">defined</span>(<span class="enscript-variable-name">BUILDING_WX__</span>) &amp;&amp; !<span class="enscript-variable-name">COMPILER</span>(<span class="enscript-variable-name">GCC</span>)
  65. #<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>)
  66. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span> __declspec(dllexport)
  67. #<span class="enscript-reference">else</span>
  68. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span> __declspec(dllimport)
  69. #<span class="enscript-reference">endif</span>
  70. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTCLASS</span> JS_EXPORTDATA
  71. #<span class="enscript-reference">else</span>
  72. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTDATA</span>
  73. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORTCLASS</span>
  74. #<span class="enscript-reference">endif</span>
  75. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_EXPORT_PRIVATE</span>
  76. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">JS_EXPORT_PRIVATE</span>
  77. #<span class="enscript-reference">endif</span> <span class="enscript-comment">/* USE(EXPORT_MACROS) */</span>
  78. #<span class="enscript-reference">if</span> <span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINDOWS</span>)
  79. <span class="enscript-comment">// If we don't define these, they get defined in windef.h.
  80. </span><span class="enscript-comment">// We want to use std::min and std::max
  81. </span>#<span class="enscript-reference">define</span> <span class="enscript-variable-name">max</span> max
  82. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">min</span> min
  83. #<span class="enscript-reference">if</span> !<span class="enscript-variable-name">COMPILER</span>(<span class="enscript-variable-name">MSVC7_OR_LOWER</span>) &amp;&amp; !<span class="enscript-variable-name">OS</span>(<span class="enscript-variable-name">WINCE</span>)
  84. <span class="enscript-comment">// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
  85. </span>#<span class="enscript-reference">ifndef</span> <span class="enscript-variable-name">_CRT_RAND_S</span>
  86. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">_CRT_RAND_S</span>
  87. #<span class="enscript-reference">endif</span>
  88. #<span class="enscript-reference">endif</span>
  89. #<span class="enscript-reference">endif</span>
  90. #<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>)
  91. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_OS_RANDOMNESS</span> 1
  92. #<span class="enscript-reference">endif</span>
  93. #<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>)
  94. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">HAVE_PTHREAD_NP_H</span> 1
  95. #<span class="enscript-reference">endif</span>
  96. <span class="enscript-comment">/* FIXME: if all platforms have these, do they really need #defines? */</span>
  97. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">HAVE_STDINT_H</span> 1
  98. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_CHANGES</span> 1
  99. #<span class="enscript-reference">ifdef</span> <span class="enscript-variable-name">__cplusplus</span>
  100. #<span class="enscript-reference">undef</span> <span class="enscript-variable-name">new</span>
  101. #<span class="enscript-reference">undef</span> <span class="enscript-variable-name">delete</span>
  102. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;wtf/FastMalloc.h&gt;</span>
  103. #<span class="enscript-reference">endif</span>
  104. <span class="enscript-comment">// this breaks compilation of &lt;QFontDatabase&gt;, at least, so turn it off for now
  105. </span><span class="enscript-comment">// Also generates errors on wx on Windows, because these functions
  106. </span><span class="enscript-comment">// are used from wx headers.
  107. </span>#<span class="enscript-reference">if</span> !<span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">QT</span>) &amp;&amp; !<span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">WX</span>)
  108. #<span class="enscript-reference">include</span> <span class="enscript-string">&lt;wtf/DisallowCType.h&gt;</span>
  109. #<span class="enscript-reference">endif</span>
  110. #<span class="enscript-reference">if</span> <span class="enscript-variable-name">COMPILER</span>(<span class="enscript-variable-name">MSVC</span>)
  111. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">SKIP_STATIC_CONSTRUCTORS_ON_MSVC</span> 1
  112. #<span class="enscript-reference">else</span>
  113. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">SKIP_STATIC_CONSTRUCTORS_ON_GCC</span> 1
  114. #<span class="enscript-reference">endif</span>
  115. #<span class="enscript-reference">if</span> <span class="enscript-variable-name">PLATFORM</span>(<span class="enscript-variable-name">CHROMIUM</span>)
  116. #<span class="enscript-reference">if</span> !<span class="enscript-reference">defined</span>(<span class="enscript-variable-name">WTF_USE_V8</span>)
  117. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_V8</span> 1
  118. #<span class="enscript-reference">endif</span>
  119. #<span class="enscript-reference">endif</span> <span class="enscript-comment">/* PLATFORM(CHROMIUM) */</span>
  120. #<span class="enscript-reference">if</span> !<span class="enscript-reference">defined</span>(<span class="enscript-variable-name">WTF_USE_V8</span>)
  121. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_V8</span> 0
  122. #<span class="enscript-reference">endif</span> <span class="enscript-comment">/* !defined(WTF_USE_V8) */</span>
  123. <span class="enscript-comment">/* Using V8 implies not using JSC and vice versa */</span>
  124. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">WTF_USE_JSC</span> !WTF_USE_V8
  125. </pre>
  126. <hr />
  127. </body></html>