Changeset 35234 in webkit


Ignore:
Timestamp:
Jul 18, 2008 8:31:37 AM (16 years ago)
Author:
ddkilzer@apple.com
Message:

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

JavaScriptCore:

2008-07-18 Landry Breuil <landry@openbsd.org>

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 <landry@openbsd.org>

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.
Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r35231 r35234  
     12008-07-18  Landry Breuil  <landry@openbsd.org>
     2
     3        Bug 19975: [OpenBSD] Patches to enable build of WebKit
     4
     5        <https://bugs.webkit.org/show_bug.cgi?id=19975>
     6
     7        Reviewed by David Kilzer.
     8
     9        Support for OpenBSD, mostly threading and libm tweaks.
     10
     11        * kjs/collector.cpp: #include <pthread.h>
     12        (KJS::currentThreadStackBase): use pthread_stackseg_np() to get stack base
     13        * kjs/config.h: OpenBSD also provides <pthread_np.h>
     14        * wtf/MathExtras.h: #include <sys/types.h> and <machine/ieee.h>
     15        (isfinite), (signbit): as long as we don't have those functions provide fallback implementations
     16        * wtf/Platform.h: Add support for PLATFORM(OPENBSD) and PLATFORM(SPARC64) macro
     17
    1182008-07-17  Geoffrey Garen  <ggaren@apple.com>
    219
  • trunk/JavaScriptCore/kjs/collector.cpp

    r35160 r35234  
    6464#endif
    6565
     66#if PLATFORM(OPENBSD)
     67#include <pthread.h>
     68#endif
     69
    6670#if HAVE(PTHREAD_NP_H)
    6771#include <pthread_np.h>
     
    370374    thr_stksegment(&s);
    371375    return s.ss_sp;
     376#elif PLATFORM(OPENBSD)
     377    pthread_t thread = pthread_self();
     378    stack_t stack;
     379    pthread_stackseg_np(thread, &stack);
     380    return stack.ss_sp;
    372381#elif PLATFORM(UNIX)
    373382    static void* stackBase = 0;
  • trunk/JavaScriptCore/kjs/config.h

    r34838 r35234  
    3838#endif
    3939
    40 #if PLATFORM(FREEBSD)
     40#if PLATFORM(FREEBSD) || PLATFORM(OPENBSD)
    4141#define HAVE_PTHREAD_NP_H 1
    4242#endif
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r34198 r35234  
    3333#if PLATFORM(SOLARIS)
    3434#include <ieeefp.h>
     35#endif
     36
     37#if PLATFORM(OPENBSD)
     38#include <sys/types.h>
     39#include <machine/ieee.h>
    3540#endif
    3641
     
    7277#ifndef signbit
    7378inline bool signbit(double x) { return x < 0.0; } // FIXME: Wrong for negative 0.
     79#endif
     80
     81#endif
     82
     83#if PLATFORM(OPENBSD)
     84
     85#ifndef isfinite
     86inline bool isfinite(double x) { return finite(x); }
     87#endif
     88#ifndef signbit
     89inline bool signbit(double x) { struct ieee_double *p = (struct ieee_double *)&x; return p->dbl_sign; }
    7490#endif
    7591
  • trunk/JavaScriptCore/wtf/Platform.h

    r34969 r35234  
    5858#endif
    5959
     60/* PLATFORM(OPENBSD) */
     61/* Operating system level dependencies for OpenBSD systems that */
     62/* should be used regardless of operating environment */
     63#ifdef __OpenBSD__
     64#define WTF_PLATFORM_OPENBSD 1
     65#endif
     66
    6067/* PLATFORM(SOLARIS) */
    6168/* Operating system level dependencies for Solaris that should be used */
     
    173180#endif
    174181
     182/* PLATFORM(SPARC64) */
     183#if defined(__sparc64__)
     184#define WTF_PLATFORM_SPARC64 1
     185#define WTF_PLATFORM_BIG_ENDIAN 1
     186#endif
     187
    175188/* Compiler */
    176189
  • trunk/WebKitTools/ChangeLog

    r35214 r35234  
     12008-07-18  Landry Breuil  <landry@openbsd.org>
     2
     3        Bug 19975: [OpenBSD] Patches to enable build of WebKit
     4
     5        <https://bugs.webkit.org/show_bug.cgi?id=19975>
     6
     7        Reviewed by David Kilzer.
     8
     9        * DumpRenderTree/DumpRenderTree.h: OpenBSD doesn't support wide characters.
     10
    1112008-07-16  Jon Honeycutt  <jhoneycutt@apple.com>
    212
  • trunk/WebKitTools/DumpRenderTree/DumpRenderTree.h

    r28705 r35234  
    4747#include <string>
    4848
     49#if !PLATFORM(OPENBSD)
    4950std::wstring urlSuitableForTestResult(const std::wstring& url);
     51#endif
    5052
    5153class LayoutTestController;
Note: See TracChangeset for help on using the changeset viewer.