Changeset 38699 in webkit


Ignore:
Timestamp:
Nov 24, 2008 12:09:56 AM (15 years ago)
Author:
Simon Hausmann
Message:

2008-11-24 Joerg Bornemann <joerg.bornemann@trolltech.com>

Reviewed by Simon Hausmann.

https://bugs.webkit.org/show_bug.cgi?id=20746

Various small compilation fixes to make the Qt port of WebKit
compile on Windows CE.

  • config.h: Don't set _CRT_RAND_S for CE, it's not available.
  • jsc.cpp: Disabled use of debugger includes for CE. It does not have the debugging functions.
  • runtime/DateMath.cpp: Use localtime() on Windows CE.
  • wtf/Assertions.cpp: Compile on Windows CE without debugger.
  • wtf/Assertions.h: Include windows.h before defining ASSERT.
  • wtf/MathExtras.h: Include stdlib.h instead of xmath.h.
  • wtf/Platform.h: Disable ERRNO_H and detect endianess based on the Qt endianess. On Qt for Windows CE the endianess is defined by the vendor specific build spec.
  • wtf/Threading.h: Use the volatile-less atomic functions.
  • wtf/dtoa.cpp: Compile without errno.
  • wtf/win/MainThreadWin.cpp: Don't include windows.h on CE after Assertions.h due to the redefinition of ASSERT.
Location:
trunk/JavaScriptCore
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r38697 r38699  
     12008-11-24  Joerg Bornemann  <joerg.bornemann@trolltech.com>
     2
     3        Reviewed by Simon Hausmann.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=20746
     6
     7        Various small compilation fixes to make the Qt port of WebKit
     8        compile on Windows CE.
     9
     10        * config.h: Don't set _CRT_RAND_S for CE, it's not available.
     11        * jsc.cpp: Disabled use of debugger includes for CE. It
     12          does not have the debugging functions.
     13        * runtime/DateMath.cpp: Use localtime() on Windows CE.
     14        * wtf/Assertions.cpp: Compile on Windows CE without debugger.
     15        * wtf/Assertions.h: Include windows.h before defining ASSERT.
     16        * wtf/MathExtras.h: Include stdlib.h instead of xmath.h.
     17        * wtf/Platform.h: Disable ERRNO_H and detect endianess based
     18          on the Qt endianess. On Qt for Windows CE the endianess is
     19          defined by the vendor specific build spec.
     20        * wtf/Threading.h: Use the volatile-less atomic functions.
     21        * wtf/dtoa.cpp: Compile without errno.
     22        * wtf/win/MainThreadWin.cpp: Don't include windows.h on CE after
     23        Assertions.h due to the redefinition of ASSERT.
     24
    1252008-11-22  Gavin Barraclough  <barraclough@apple.com>
    226
  • trunk/JavaScriptCore/config.h

    r38114 r38699  
    3333#define min min
    3434
    35 #if !COMPILER(MSVC7)
     35#if !COMPILER(MSVC7) && !PLATFORM(WIN_CE)
    3636// We need to define this before the first #include of stdlib.h or it won't contain rand_s.
    3737#ifndef _CRT_RAND_S
  • trunk/JavaScriptCore/jsc.cpp

    r38523 r38699  
    5252#endif
    5353
    54 #if COMPILER(MSVC)
     54#if COMPILER(MSVC) && !PLATFORM(WIN_CE)
    5555#include <crtdbg.h>
    5656#include <windows.h>
     
    257257    cleanupGlobalData(&exec->globalData());
    258258    exit(EXIT_SUCCESS);
    259 #if !COMPILER(MSVC)
     259#if !COMPILER(MSVC) && !PLATFORM(WIN_CE)
    260260    // MSVC knows that exit(0) never returns, so it flags this return statement as unreachable.
    261261    return jsUndefined();
  • trunk/JavaScriptCore/runtime/DateMath.cpp

    r38176 r38699  
    414414void getLocalTime(const time_t* localTime, struct tm* localTM)
    415415{
    416 #if COMPILER(MSVC7) || COMPILER(MINGW)
     416#if COMPILER(MSVC7) || COMPILER(MINGW) || PLATFORM(WIN_CE)
    417417    *localTM = *localtime(localTime);
    418418#elif COMPILER(MSVC)
  • trunk/JavaScriptCore/wtf/Assertions.cpp

    r35900 r38699  
    3535#endif
    3636
    37 #if COMPILER(MSVC)
     37#if COMPILER(MSVC) && !PLATFORM(WIN_CE)
    3838#ifndef WINVER
    3939#define WINVER 0x0500
     
    6767        CFRelease(cfFormat);
    6868    } else
    69 #elif COMPILER(MSVC)
     69#elif COMPILER(MSVC) && !PLATFORM(WIN_CE)
    7070    if (IsDebuggerPresent()) {
    7171        size_t size = 1024;
  • trunk/JavaScriptCore/wtf/Assertions.h

    r38673 r38699  
    129129/* ASSERT, ASSERT_WITH_MESSAGE, ASSERT_NOT_REACHED */
    130130
     131#if PLATFORM(WIN_CE)
     132/* FIXME: We include this here only to avoid a conflict with the ASSERT macro. */
     133#include <windows.h>
     134#undef min
     135#undef max
     136#undef ERROR
     137#endif
     138
    131139#if PLATFORM(WIN_OS)
    132140/* FIXME: Change to use something other than ASSERT to avoid this conflict with win32. */
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r38177 r38699  
    4141
    4242#if COMPILER(MSVC)
    43 
     43#if PLATFORM(WIN_CE)
     44#include <stdlib.h>
     45#else
    4446#include <xmath.h>
     47#endif
    4548#include <limits>
    4649
  • trunk/JavaScriptCore/wtf/Platform.h

    r38487 r38699  
    211211#endif
    212212
     213/* PLATFORM(WIN_CE) && PLATFORM(QT)
     214   We can not determine the endianess at compile time. For
     215   Qt for Windows CE the endianess is specified in the
     216   device specific makespec
     217*/
     218#if PLATFORM(WIN_CE) && PLATFORM(QT)
     219#   include <QtGlobal>
     220#   undef WTF_PLATFORM_BIG_ENDIAN
     221#   undef WTF_PLATFORM_MIDDLE_ENDIAN
     222#   if Q_BYTE_ORDER == Q_BIG_EDIAN
     223#       define WTF_PLATFORM_BIG_ENDIAN 1
     224#   endif
     225#endif
     226
    213227/* Compiler */
    214228
     
    325339
    326340#define HAVE_FLOAT_H 1
     341#if PLATFORM(WIN_CE)
     342#define HAVE_ERRNO_H 0
     343#else
    327344#define HAVE_SYS_TIMEB_H 1
     345#endif
    328346#define HAVE_VIRTUALALLOC 1
    329347
  • trunk/JavaScriptCore/wtf/Threading.h

    r38101 r38699  
    6060#define Threading_h
    6161
     62#if PLATFORM(WIN_CE)
     63#include <windows.h>
     64#endif
     65
    6266#include <wtf/Assertions.h>
    6367#include <wtf/Locker.h>
    6468#include <wtf/Noncopyable.h>
    6569
    66 #if PLATFORM(WIN_OS)
     70#if PLATFORM(WIN_OS) && !PLATFORM(WIN_CE)
    6771#include <windows.h>
    6872#elif PLATFORM(DARWIN)
     
    175179#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
    176180
    177 #if COMPILER(MINGW) || COMPILER(MSVC7)
     181#if COMPILER(MINGW) || COMPILER(MSVC7) || PLATFORM(WIN_CE)
    178182inline void atomicIncrement(int* addend) { InterlockedIncrement(reinterpret_cast<long*>(addend)); }
    179183inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpret_cast<long*>(addend)); }
  • trunk/JavaScriptCore/wtf/dtoa.cpp

    r38390 r38699  
    136136#include "dtoa.h"
    137137
     138#if HAVE(ERRNO_H)
    138139#include <errno.h>
     140#else
     141#define NO_ERRNO
     142#endif
    139143#include <float.h>
    140144#include <math.h>
  • trunk/JavaScriptCore/wtf/win/MainThreadWin.cpp

    r36062 r38699  
    3232#include "Assertions.h"
    3333#include "Threading.h"
     34#if !PLATFORM(WIN_CE)
    3435#include <windows.h>
     36#endif
    3537
    3638namespace WTF {
Note: See TracChangeset for help on using the changeset viewer.