Changeset 65091 in webkit for trunk/JavaScriptCore/wtf


Ignore:
Timestamp:
Aug 10, 2010, 1:47:08 PM (15 years ago)
Author:
[email protected]
Message:

2010-08-10 Patrick Gansterer <[email protected]>

Reviewed by Eric Seidel.

Make FastMalloc more portable.
https://bugs.webkit.org/show_bug.cgi?id=41790

  • wtf/FastMalloc.cpp: (WTF::TCMalloc_Central_FreeList::Populate): (WTF::TCMalloc_ThreadCache::CreateCacheIfNecessary):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/FastMalloc.cpp

    r65042 r65091  
    416416#include "TCSystemAlloc.h"
    417417#include <algorithm>
    418 #include <errno.h>
    419418#include <limits>
    420419#include <pthread.h>
     
    422421#include <stddef.h>
    423422#include <stdio.h>
     423#if HAVE(ERRNO_H)
     424#include <errno.h>
     425#endif
    424426#if OS(UNIX)
    425427#include <unistd.h>
    426428#endif
    427 #if COMPILER(MSVC)
     429#if OS(WINDOWS)
    428430#ifndef WIN32_LEAN_AND_MEAN
    429431#define WIN32_LEAN_AND_MEAN
     
    26882690  }
    26892691  if (span == NULL) {
     2692#if HAVE(ERRNO_H)
    26902693    MESSAGE("allocation failed: %d\n", errno);
     2694#elif OS(WINDOWS)
     2695    MESSAGE("allocation failed: %d\n", ::GetLastError());
     2696#else
     2697    MESSAGE("allocation failed\n");
     2698#endif
    26912699    lock_.Lock();
    26922700    return;
     
    30553063
    30563064  heap->in_setspecific_ = true;
    3057   pthread_setspecific(heap_key, NULL);
     3065  setThreadHeap(NULL);
    30583066#ifdef HAVE_TLS
    30593067  // Also update the copy in __thread
Note: See TracChangeset for help on using the changeset viewer.