Ignore:
Timestamp:
Jan 13, 2008, 11:47:56 AM (18 years ago)
Author:
Darin Adler
Message:

Contributions and review by Adriaan de Groot,
Simon Hausmann, Eric Seidel, and Darin Adler.

  • kjs/DateMath.h: (KJS::GregorianDateTime::GregorianDateTime): Use the WIN_OS code path for SOLARIS too, presumably because Solaris also lacks the tm_gtoff and tm_zone fields. (KJS::GregorianDateTime::operator tm): Ditto.
  • kjs/collector.cpp: (KJS::currentThreadStackBase): Use thr_stksegment on Solaris.
  • wtf/MathExtras.h: (isfinite): Implement for Solaris. (isinf): Ditto. (signbit): Ditto. But this one is wrong, so I added a FIXME.
  • wtf/Platform.h: Define PLATFORM(SOLARIS) when "sun" or "sun" is defined.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/collector.cpp

    r29396 r29454  
    11// -*- mode: c++; c-basic-offset: 4 -*-
    22/*
    3  *  This file is part of the KDE libraries
    43 *  Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
    54 *  Copyright (C) 2007 Eric Seidel <[email protected]>
     
    5958#include <sys/mman.h>
    6059#include <unistd.h>
     60
     61#if PLATFORM(SOLARIS)
     62#include <thread.h>
     63#endif
    6164
    6265#if HAVE(PTHREAD_NP_H)
     
    334337        );
    335338    return (void*)pTib->StackBase;
     339#elif PLATFORM(SOLARIS)
     340    stack_t s;
     341    thr_stksegment(&s);
     342    return s.ss_sp;
    336343#elif PLATFORM(UNIX)
    337     static void *stackBase = 0;
     344    static void* stackBase = 0;
    338345    static size_t stackSize = 0;
    339346    static pthread_t stackThread;
     
    350357#endif
    351358        int rc = pthread_attr_getstack(&sattr, &stackBase, &stackSize);
    352         (void)rc; // FIXME: deal with error code somehow?  seems fatal...
     359        (void)rc; // FIXME: Deal with error code somehow? Seems fatal.
    353360        ASSERT(stackBase);
    354361        pthread_attr_destroy(&sattr);
    355362        stackThread = thread;
    356363    }
    357     return (void*)(size_t(stackBase) + stackSize);
     364    return static_cast<char*>(stackBase) + stackSize;
    358365#else
    359366#error Need a way to get the stack base on this platform
Note: See TracChangeset for help on using the changeset viewer.