non-gcc kjs/ build fixes

André Wöbbeking Woebbeking at kde.org
Sat Dec 8 18:27:16 GMT 2007


On Friday 07 December 2007, Adriaan de Groot wrote:
> I'd like to apply the following to get kjs/ to compile on non-gcc
> platforms. The patches are similar to earlier fixes I put in, but
> given the timeframe, I'd like to check for permission again. There is
> also a need to handle variants in munmap parameter types. Some
> munmap()s take a void *, some a char * -- I have the latter, so there
> are a bunch of reinterpret_cast<void *> that I need to remove. Would
> it be acceptable to introduce a macro MUNMAP_PTR_T_CAST that does the
> right thing?
>
> PS. Please CC on reply, as I'm not subscribed.
>
> --- kjs/collector.cpp   (revision 740597)
> +++ kjs/collector.cpp   (working copy)
> @@ -74,6 +74,7 @@
>
>
>  using std::max;
> +using std::memset;
>
>  namespace KJS {
>
> --- kjs/collector.h     (revision 740597)
> +++ kjs/collector.h     (working copy)
> @@ -127,7 +127,7 @@
>      bool get(size_t n) const { return !!(bits[n >> 5] & (1 << (n &
> 0x1F))); } void set(size_t n) { bits[n >> 5] |= (1 << (n & 0x1F)); }
> void clear(size_t n) { bits[n >> 5] &= ~(1 << (n & 0x1F)); } -   
> void clearAll() { memset(bits, 0, sizeof(bits)); }
> +    void clearAll() { std::memset(bits, 0, sizeof(bits)); }

Why do you need using std::memset then?




More information about the kde-core-devel mailing list