non-gcc kjs/ build fixes
Adriaan de Groot
groot at kde.org
Fri Dec 7 10:08:25 GMT 2007
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)); }
};
struct CollectorCell {
--- kjs/date_object.cpp (revision 740597)
+++ kjs/date_object.cpp (working copy)
@@ -50,6 +50,10 @@
#include <cstring>
#include <time.h>
+#if PLATFORM(SOLARIS_OS)
+#include <strings.h>
+#endif
+
#include "error_object.h"
#include "operations.h"
--
These are your friends - Adem
GPG: FEA2 A3FE Adriaan de Groot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071207/5b76947f/attachment.sig>
More information about the kde-core-devel
mailing list