Changeset 34597 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
Jun 16, 2008, 6:29:21 AM (17 years ago)
Author:
Simon Hausmann
Message:

2008-06-16 Adriaan de Groot <[email protected]>

Reviewed by Simon.

Fix compilation on Solaris

On some systems, munmap takes a char* instead of a void* (contrary to POSIX and
Single Unix Specification). Since you can always convert from char* to void*
but not vice-versa, do the casting to char*.

Location:
trunk/JavaScriptCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r34593 r34597  
     12008-06-16  Adriaan de Groot  <[email protected]>
     2
     3        Reviewed by Simon.
     4
     5        Fix compilation on Solaris
     6
     7        On some systems, munmap takes a char* instead of a void* (contrary to POSIX and
     8        Single Unix Specification). Since you can always convert from char* to void*
     9        but not vice-versa, do the casting to char*.
     10
     11        * kjs/collector.cpp:
     12        (KJS::allocateBlock):
     13        (KJS::freeBlock):
     14
    1152008-06-16  Cameron Zwarich  <[email protected]>
    216
  • trunk/JavaScriptCore/kjs/collector.cpp

    r34587 r34597  
    118118
    119119    if (adjust > 0)
    120         munmap(reinterpret_cast<void*>(address), adjust);
     120        munmap(reinterpret_cast<char*>(address), adjust);
    121121
    122122    if (adjust < extra)
    123         munmap(reinterpret_cast<void*>(address + adjust + BLOCK_SIZE), extra - adjust);
     123        munmap(reinterpret_cast<char*>(address + adjust + BLOCK_SIZE), extra - adjust);
    124124
    125125    address += adjust;
     
    139139    free(block);
    140140#else
    141     munmap(block, BLOCK_SIZE);
     141    munmap(reinterpret_cast<char *>(block), BLOCK_SIZE);
    142142#endif
    143143}
Note: See TracChangeset for help on using the changeset viewer.