Commit 36819cd9 authored by vestbo@webkit.org's avatar vestbo@webkit.org

[Qt] Build fix for windows.

Patch by Csaba Osztrogonac <oszi@inf.u-szeged.hu> on 2009-09-15
Reviewed by Tor Arne Vestbø.

After http://trac.webkit.org/changeset/47795 the MinGW build broke,
because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.

* runtime/Collector.cpp:
(JSC::Heap::allocateBlock): MinGW case added.
(JSC::Heap::freeBlock): MinGW case added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48391 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 5c821e66
2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
Reviewed by Tor Arne Vestbø.
[Qt] Build fix for windows.
After http://trac.webkit.org/changeset/47795 the MinGW build broke,
because MinGW has __mingw_aligned_malloc instead of _aligned_malloc.
* runtime/Collector.cpp:
(JSC::Heap::allocateBlock): MinGW case added.
(JSC::Heap::freeBlock): MinGW case added.
2009-09-15 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
Reviewed by Tor Arne Vestbø.
......
......@@ -237,7 +237,11 @@ NEVER_INLINE CollectorBlock* Heap::allocateBlock()
memset(reinterpret_cast<void*>(address), 0, BLOCK_SIZE);
#elif PLATFORM(WIN_OS)
#if COMPILER(MINGW)
void* address = __mingw_aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
#else
void* address = _aligned_malloc(BLOCK_SIZE, BLOCK_SIZE);
#endif
memset(address, 0, BLOCK_SIZE);
#elif HAVE(POSIX_MEMALIGN)
void* address;
......@@ -315,7 +319,11 @@ NEVER_INLINE void Heap::freeBlock(CollectorBlock* block)
#elif PLATFORM(SYMBIAN)
userChunk->Free(reinterpret_cast<TAny*>(block));
#elif PLATFORM(WIN_OS)
#if COMPILER(MINGW)
__mingw_aligned_free(block);
#else
_aligned_free(block);
#endif
#elif HAVE(POSIX_MEMALIGN)
free(block);
#else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment