kdelibs 100%

Adriaan de Groot <[email protected]>
Newsgroups gmane.comp.kde.solaris
Message-ID <[email protected]>
The documentation in CVSDude Build/ has been updated a bit, with a better 
explanation of what variables affect the build. It may be worth looking into:

svn co https://svn2.cvsdude.com/kdesolaris/trunk/Build

Do *NOT* checkout trunk directly unless you are pining for 3GB of traffic.



The makefile for libstdcxx has been updated to fetch from Apache. Some 
additional patches from Stefan have gone in, but are untested by me.


The state of kdesupport is unchanged. Patch to current SVN attached -- it 
changes the use of std::map<> with incomplete types and links the C libs to 
libstdcxx.

kdelibs in KDE SVN is now also almost 100%. Patch attached -- it moves 
cacheGlobalObject() back into the KJS namespace. It can't go in because it's 
broken for GCC.

No runtime tests have been executed for kdelibs yet. Thanks to yura for some 
of the patches.

-- 
These are your friends - Adem
    GPG: FEA2 A3FE Adriaan de Groot

___________________________________________________
This message is from the kde-solaris mailing list.
Account management:  https://mail.kde.org/mailman/listinfo/kde-solaris.
Archives: http://lists.kde.org/.
More info: http://www.kde.org/faq.html.
kdesupport.diff (text/x-diff, 4.4 KB)
Index: strigi/src/streams/archivereader.cpp
===================================================================
--- strigi/src/streams/archivereader.cpp	(revision 712781)
+++ strigi/src/streams/archivereader.cpp	(working copy)
@@ -56,6 +56,9 @@
  */
 class ArchiveEntryCache {
 public:
+    class SubEntry;
+    typedef std::map<std::string, SubEntry *> SubEntryMap;
+
     /**
      * @brief Represents an entry in the cache.
      */
@@ -65,7 +68,7 @@
         EntryInfo entry;
         /** A list of subentries of this entry. */
         //can't define staticly constructed object while object is being defined
-        std::map<std::string, SubEntry> entries;
+        SubEntryMap entries;
         /**
          * @brief The number of entries in the cache below and including
          * this one.
@@ -76,7 +79,7 @@
         /** Constructor */
         SubEntry() { }
         /** Destructor */
-        virtual ~SubEntry() {}
+        virtual ~SubEntry();
     };
     /**
      * @brief Represents a top-level entry in the cache
@@ -130,14 +133,23 @@
     void print() const;
 };
 
+ArchiveEntryCache::SubEntry::~SubEntry() {
+    SubEntryMap::iterator i;
+    for (i=entries.begin(); i!=entries.end(); ++i) {
+        delete i->second;
+    }
+    // Probably superfluous
+    entries.clear();
+}
+
 void
 ArchiveEntryCache::print() const {
     std::map<std::string, RootSubEntry>::const_iterator j;
     for (j=cache.begin(); j!=cache.end(); ++j) {
         printf("x %s\n", j->first.c_str());
-        std::map<std::string, SubEntry>::const_iterator i;
+        SubEntryMap::const_iterator i;
         for (i = j->second.entries.begin(); i != j->second.entries.end(); ++i) {
-            printf("- %s ", i->second.entry.filename.c_str());
+            printf("- %s ", i->second->entry.filename.c_str());
         }
         printf("\n");
     }
@@ -145,9 +157,9 @@
 int32_t
 ArchiveEntryCache::SubEntry::count() const {
     int32_t count = 1;
-    map<string, SubEntry>::const_iterator i;
+    SubEntryMap::const_iterator i;
     for (i = entries.begin(); i != entries.end(); ++i) {
-        count += i->second.count();
+        count += i->second->count();
     }
     return count;
 }
@@ -179,7 +191,7 @@
     }
     const SubEntry* e = &ei->second;
 
-    map<string, SubEntry>::const_iterator i;
+    SubEntryMap::const_iterator i;
 
     size_t p = ei->first.length();
     do {
@@ -194,7 +206,7 @@
         if (i == e->entries.end()) {
             e = 0;
         } else {
-            e = &i->second;
+            e = i->second;
             p = np;
         }
         if (p == url.length()) {
@@ -268,19 +280,19 @@
     se.entry.filename = name;
 
     // find the right entry
-    map<string, ArchiveEntryCache::SubEntry>::iterator ii;
+    ArchiveEntryCache::SubEntryMap::iterator ii;
     ArchiveEntryCache::SubEntry* parent = &e;
     for (uint i=0; i<names.size(); ++i) {
         ii = parent->entries.find(names[i]);
         if (ii == parent->entries.end()) {
-            ArchiveEntryCache::SubEntry newse;
-            newse.entry.filename = names[i];
-            newse.entry.type = EntryInfo::Dir;
-            newse.entry.size = 0;
+            ArchiveEntryCache::SubEntry *newse = new ArchiveEntryCache::SubEntry;
+            newse->entry.filename = names[i];
+            newse->entry.type = EntryInfo::Dir;
+            newse->entry.size = 0;
             parent->entries[names[i]] = newse;
             ii = parent->entries.find(names[i]);
         }
-        parent = &ii->second;
+        parent = ii->second;
     }
     *parent = se;
 }
@@ -602,9 +614,9 @@
     }
 
     if (subentry) {
-        map<string, ArchiveEntryCache::SubEntry>::const_iterator i;
+        ArchiveEntryCache::SubEntryMap::const_iterator i;
         for (i = subentry->entries.begin(); i != subentry->entries.end(); ++i) {
-            v.push_back(i->second.entry);
+            v.push_back(i->second->entry);
         }
     }
     DirLister dl(v);
Index: taglib/bindings/c/CMakeLists.txt
===================================================================
--- taglib/bindings/c/CMakeLists.txt	(revision 712781)
+++ taglib/bindings/c/CMakeLists.txt	(working copy)
@@ -33,7 +33,7 @@
   # stlport4 and stdcxx -- make this a mess. We really only
   # support stdcxx, but won't force the issue here.
   #
-  TARGET_LINK_LIBRARIES(tag_c Crun)
+  TARGET_LINK_LIBRARIES(tag_c stdcxx Crun)
 ENDIF(HAVE_CRUN_LIB)
 
 SET_TARGET_PROPERTIES(tag_c PROPERTIES VERSION 0.0.0 SOVERSION 0 )
kdelibs.diff (text/x-diff, 3.7 KB)
Index: khtml/ecma/kjs_binding.h
===================================================================
--- khtml/ecma/kjs_binding.h	(revision 713006)
+++ khtml/ecma/kjs_binding.h	(working copy)
@@ -386,10 +386,10 @@
 // cacheGlobalObject<> is not in namepsace KJS - need to use ::cacheGlobalObject<>
 #define KJS_EMPTY_PROTOTYPE_IMP(ClassName, ClassProto, ProtoCode) \
       class ClassProto : public ObjectImp { \
-      friend ObjectImp* KJS_GCC_ROOT_NS_HACK cacheGlobalObject<ClassProto>(ExecState *exec, const Identifier &propertyName); \
+      friend ObjectImp* KJS_CACHEGLOBALOBJECT_NS cacheGlobalObject<ClassProto>(ExecState *exec, const Identifier &propertyName); \
       public: \
         static ObjectImp* self(ExecState *exec) { \
-          return ::cacheGlobalObject<ClassProto>(exec, *name()); \
+          return KJS_CACHEGLOBALOBJECT_NS cacheGlobalObject<ClassProto>(exec, *name()); \
         } \
         virtual const ClassInfo *classInfo() const { return &info; } \
         static const ClassInfo info; \
Index: kjs/lookup.h
===================================================================
--- kjs/lookup.h	(revision 713006)
+++ kjs/lookup.h	(working copy)
@@ -267,6 +267,17 @@
   }
 } // namespace
 
+#if COMPILER(GCC)
+#define KJS_OBJECTCACHE_IN_KJS (0)
+#define KJS_CACHEGLOBALOBJECT_NS ::
+#else
+#define KJS_OBJECTCACHE_IN_KJS (1)
+#define KJS_CACHEGLOBALOBJECT_NS KJS::
+#endif
+
+#if KJS_OBJECTCACHE_IN_KJS
+namespace KJS {
+#endif
 /*
  * The template method below can't be in the KJS namespace because it's used in
  * KJS_DEFINE_PROPERTY which can be used outside of the KJS namespace. It can be moved back
@@ -293,6 +304,9 @@
   globalObject->put(exec, propertyName, newObject, KJS::Internal | KJS::DontEnum);
   return newObject;
 }
+#if KJS_OBJECTCACHE_IN_KJS
+}
+#endif
 
 /**
  * Helpers to define prototype objects (each of which simply implements
@@ -311,17 +325,10 @@
  * then the first line will use KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE, with DOMNodeProto as the second argument.
  */
 
-// Work around a bug in GCC 4.1
-#if !COMPILER(GCC)
-#define KJS_GCC_ROOT_NS_HACK ::
-#else
-#define KJS_GCC_ROOT_NS_HACK
-#endif
-
 // These macros assume that a prototype's only properties are functions
 #define KJS_DEFINE_PROTOTYPE(ClassProto) \
   class ClassProto : public KJS::JSObject { \
-    friend KJS::JSObject *KJS_GCC_ROOT_NS_HACK cacheGlobalObject<ClassProto>(KJS::ExecState *exec, const KJS::Identifier &propertyName); \
+    friend KJS::JSObject* KJS_CACHEGLOBALOBJECT_NS cacheGlobalObject<ClassProto>(KJS::ExecState *exec, const KJS::Identifier &propertyName); \
   public: \
     static KJS::JSObject *self(KJS::ExecState *exec); \
     virtual const KJS::ClassInfo *classInfo() const { return &info; } \
@@ -337,7 +344,7 @@
 
 #define KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(ClassProto, ClassProtoProto) \
     class ClassProto : public KJS::JSObject { \
-        friend KJS::JSObject* KJS_GCC_ROOT_NS_HACK cacheGlobalObject<ClassProto>(KJS::ExecState* exec, const KJS::Identifier& propertyName); \
+        friend KJS::JSObject* KJS_CACHEGLOBALOBJECT_NS cacheGlobalObject<ClassProto>(KJS::ExecState* exec, const KJS::Identifier& propertyName); \
     public: \
         static KJS::JSObject* self(KJS::ExecState* exec); \
         virtual const KJS::ClassInfo* classInfo() const { return &info; } \
@@ -357,7 +364,7 @@
     Identifier* ClassProto::s_name = 0; \
     JSObject *ClassProto::self(ExecState *exec) \
     { \
-      return ::cacheGlobalObject<ClassProto>(exec, *name()); \
+      return KJS_CACHEGLOBALOBJECT_NS cacheGlobalObject<ClassProto>(exec, *name()); \
     } \
     bool ClassProto::getOwnPropertySlot(ExecState *exec, const Identifier& propertyName, PropertySlot& slot) \
     { \
signature.asc (application/pgp-signature, 187 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (FreeBSD)

iD8DBQBG7HVsdqzuAf6io/4RAtJcAKCBrzu6a2ay8a087pPshZnQJZ7GzgCfYdVB
dRYmgdUoQXrxifd8y9c4IYs=
=KqXh
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.