source: webkit/trunk/JavaScriptCore/kjs/config.h@ 35900

Last change on this file since 35900 was 35234, checked in by [email protected], 17 years ago

Bug 19975: [OpenBSD] Patches to enable build of WebKit

JavaScriptCore:

2008-07-18 Landry Breuil <[email protected]>

Bug 19975: [OpenBSD] Patches to enable build of WebKit

<https://bugs.webkit.org/show_bug.cgi?id=19975>

Reviewed by David Kilzer.

Support for OpenBSD, mostly threading and libm tweaks.

  • kjs/collector.cpp: #include <pthread.h> (KJS::currentThreadStackBase): use pthread_stackseg_np() to get stack base
  • kjs/config.h: OpenBSD also provides <pthread_np.h>
  • wtf/MathExtras.h: #include <sys/types.h> and <machine/ieee.h> (isfinite), (signbit): as long as we don't have those functions provide fallback implementations
  • wtf/Platform.h: Add support for PLATFORM(OPENBSD) and PLATFORM(SPARC64) macro

WebKitTools:

2008-07-18 Landry Breuil <[email protected]>

Bug 19975: [OpenBSD] Patches to enable build of WebKit

<https://bugs.webkit.org/show_bug.cgi?id=19975>

Reviewed by David Kilzer.

  • DumpRenderTree/DumpRenderTree.h: OpenBSD doesn't support wide characters.
  • Property svn:eol-style set to native
File size: 1.8 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#include <wtf/Platform.h>
23
24#if PLATFORM(WIN_OS)
25
26// If we don't define these, they get defined in windef.h.
27// We want to use std::min and std::max
28#define max max
29#define min min
30
31#if !COMPILER(MSVC7)
32// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
33#ifndef _CRT_RAND_S
34#define _CRT_RAND_S
35#endif
36#endif
37
38#endif
39
40#if PLATFORM(FREEBSD) || PLATFORM(OPENBSD)
41#define HAVE_PTHREAD_NP_H 1
42#endif
43
44/* FIXME: if all platforms have these, do they really need #defines? */
45#define HAVE_STDINT_H 1
46#define HAVE_STRING_H 1
47
48#define WTF_CHANGES 1
49
50#ifdef __cplusplus
51#undef new
52#undef delete
53#include <wtf/FastMalloc.h>
54#endif
55
56// this breaks compilation of <QFontDatabase>, at least, so turn it off for now
57// Also generates errors on wx on Windows, because these functions
58// are used from wx headers.
59#if !PLATFORM(QT) && !PLATFORM(WX)
60#include <wtf/DisallowCType.h>
61#endif
62
Note: See TracBrowser for help on using the repository browser.