Ignore:
Timestamp:
Jul 25, 2008, 7:28:57 PM (17 years ago)
Author:
[email protected]
Message:

On wx/Win, including windows.h in Threading.h causes multiply-defined symbol errors for libjpeg and wx, and also wx needs to include windows.h itself first for wx includes to work right. So until we can find a better solution to this problem on wx, we work around the need to include windows.h here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/Threading.h

    r34757 r35367  
    6464#include <wtf/Noncopyable.h>
    6565
    66 #if PLATFORM(WIN_OS)
     66// On wx/Win, including windows.h here causes multiply-defined symbol errors
     67// for libjpeg and wx, and also wx needs to include windows.h itself first for wx
     68// includes to work right. So until we can find a better solution to this problem,
     69// on wx, we workaround including windows.h here.
     70#if PLATFORM(WIN_OS) && !PLATFORM(WX)
    6771#include <windows.h>
    6872#elif PLATFORM(DARWIN)
     
    169173};
    170174
    171 #if PLATFORM(WIN_OS) && !COMPILER(MSVC7)
     175#if PLATFORM(WIN_OS)
    172176#define WTF_USE_LOCKFREE_THREADSAFESHARED 1
    173177
    174 #if COMPILER(MINGW)
     178#if COMPILER(MINGW) || COMPILER(MSVC7)
     179#if PLATFORM(WX)
     180// we define these prototypes to avoid a dependency on windows.h in the header. See comment at top of header.
     181long InterlockedIncrement(long *Addend);
     182long InterlockedDecrement(long *Addend);
     183#endif
    175184inline void atomicIncrement(int* addend) { InterlockedIncrement(reinterpret_cast<long*>(addend)); }
    176185inline int atomicDecrement(int* addend) { return InterlockedDecrement(reinterpret_cast<long*>(addend)); }
    177186#else
     187#if PLATFORM(WX)
     188// we define these prototypes to avoid a dependency on windows.h in the header. See comment at top of header.
     189long InterlockedIncrement(long volatile *Addend);
     190long InterlockedDecrement(long volatile *Addend);
     191#endif
    178192inline void atomicIncrement(int volatile* addend) { InterlockedIncrement(reinterpret_cast<long volatile*>(addend)); }
    179193inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
Note: See TracChangeset for help on using the changeset viewer.