Browse Source

some static init order issues

David Rose 19 years ago
parent
commit
7efe3019f2

+ 3 - 1
dtool/src/prc/configDeclaration.h

@@ -24,6 +24,8 @@
 #include "configPage.h"
 #include "vector_string.h"
 
+#include <vector>
+
 class ConfigVariableCore;
 
 ////////////////////////////////////////////////////////////////////
@@ -106,7 +108,7 @@ private:
     short _flags;
   };
 
-  typedef pvector<Word> Words;
+  typedef vector<Word> Words;
   Words _words;
   bool _got_words;
 

+ 3 - 2
dtool/src/prc/configPage.h

@@ -20,7 +20,8 @@
 #define CONFIGPAGE_H
 
 #include "dtoolbase.h"
-#include "pvector.h"
+
+#include <vector>
 
 class ConfigDeclaration;
 class ConfigVariableCore;
@@ -81,7 +82,7 @@ private:
   int _next_decl_seq;
   int _trust_level;
 
-  typedef pvector<ConfigDeclaration *> Declarations;
+  typedef vector<ConfigDeclaration *> Declarations;
   Declarations _declarations;
 
   string _signature;

+ 4 - 3
dtool/src/prc/configPageManager.cxx

@@ -22,10 +22,11 @@
 #include "prcKeyRegistry.h"
 #include "dSearchPath.h"
 #include "executionEnvironment.h"
-#include "pset.h"
 #include "config_prc.h"
 #include "pfstream.h"
 
+#include <set>
+
 // Pick up the public key definitions.
 #ifdef PRC_PUBLIC_KEYS_INCLUDE
 #include PRC_PUBLIC_KEYS_INCLUDE
@@ -196,10 +197,10 @@ reload_implicit_pages() {
   // PRC_PATTERNS) on the path.
   ConfigFiles config_files;
 
-  // Use a pset to ensure that we only visit each directory once, even
+  // Use a set to ensure that we only visit each directory once, even
   // if it appears multiple times (under different aliases!) in the
   // path.
-  pset<Filename> unique_dirnames;
+  set<Filename> unique_dirnames;
 
   // We walk through the list of directories in forward order, so that
   // the most important directories are visited first.

+ 5 - 4
dtool/src/prc/configPageManager.h

@@ -21,11 +21,12 @@
 
 #include "dtoolbase.h"
 #include "configFlags.h"
-#include "pvector.h"
 #include "dSearchPath.h"
 #include "globPattern.h"
 #include "pnotify.h"
 
+#include <vector>
+
 class ConfigPage;
 
 ////////////////////////////////////////////////////////////////////
@@ -74,7 +75,7 @@ private:
   bool scan_up_from(Filename &result, const Filename &dir, 
                     const Filename &suffix) const;
 
-  typedef pvector<ConfigPage *> Pages;
+  typedef vector<ConfigPage *> Pages;
   Pages _implicit_pages;
   Pages _explicit_pages;
   bool _pages_sorted;
@@ -85,7 +86,7 @@ private:
 
   DSearchPath _search_path;
 
-  typedef pvector<GlobPattern> Globs;
+  typedef vector<GlobPattern> Globs;
   Globs _prc_patterns;
   Globs _prc_executable_patterns;
 
@@ -101,7 +102,7 @@ private:
     int _file_flags;
     Filename _filename;
   };
-  typedef pvector<ConfigFile> ConfigFiles;
+  typedef vector<ConfigFile> ConfigFiles;
 
   static ConfigPageManager *_global_ptr;
 };

+ 3 - 3
dtool/src/prc/configVariableCore.h

@@ -23,8 +23,8 @@
 #include "configFlags.h"
 #include "configPageManager.h"
 #include "pnotify.h"
-#include "pvector.h"
-#include "pmap.h"
+
+#include <vector>
 
 class ConfigDeclaration;
 
@@ -99,7 +99,7 @@ private:
   ConfigDeclaration *_default_value;
   ConfigDeclaration *_local_value;
 
-  typedef pvector<const ConfigDeclaration *> Declarations;
+  typedef vector<const ConfigDeclaration *> Declarations;
   Declarations _declarations;
   Declarations _trusted_declarations;
   Declarations _untrusted_declarations;

+ 8 - 5
dtool/src/prc/configVariableManager.h

@@ -23,8 +23,8 @@
 #include "configFlags.h"
 #include "pnotify.h"
 #include "globPattern.h"
-#include "pvector.h"
-#include "pmap.h"
+#include <vector>
+#include <map>
 
 class ConfigVariableCore;
 
@@ -69,13 +69,15 @@ private:
   void list_variable(const ConfigVariableCore *variable,
                      bool include_descriptions) const;
 
-  typedef pvector<ConfigVariableCore *> Variables;
+  // We have to avoid pmap and pvector, due to the very low-level
+  // nature of this stuff.
+  typedef vector<ConfigVariableCore *> Variables;
   Variables _variables;
 
-  typedef pmap<string, ConfigVariableCore *> VariablesByName;
+  typedef map<string, ConfigVariableCore *> VariablesByName;
   VariablesByName _variables_by_name;
 
-  typedef pmap<GlobPattern, ConfigVariableCore *> VariableTemplates;
+  typedef map<GlobPattern, ConfigVariableCore *> VariableTemplates;
   VariableTemplates _variable_templates;
 
   static ConfigVariableManager *_global_ptr;
@@ -86,3 +88,4 @@ INLINE ostream &operator << (ostream &out, const ConfigVariableManager &variable
 #include "configVariableManager.I"
 
 #endif
+

+ 3 - 2
dtool/src/prc/notifyCategory.h

@@ -24,7 +24,8 @@
 #include "notifySeverity.h"
 #include "configVariableEnum.h"
 #include "configFlags.h"
-#include "pvector.h"
+
+#include <vector>
 
 ////////////////////////////////////////////////////////////////////
 //       Class : NotifyCategory
@@ -89,7 +90,7 @@ private:
   string _basename;
   NotifyCategory *_parent;
   ConfigVariableEnum<NotifySeverity> _severity;
-  typedef pvector<NotifyCategory *> Children;
+  typedef vector<NotifyCategory *> Children;
   Children _children;
 
   static long _server_delta; // not a time_t because server delta may be signed.

+ 4 - 2
dtool/src/prc/pnotify.h

@@ -22,7 +22,7 @@
 #include "dtoolbase.h"
 
 #include "notifySeverity.h"
-#include "pmap.h"
+#include <map>
 
 class NotifyCategory;
 
@@ -93,7 +93,9 @@ private:
   bool _assert_failed;
   string _assert_error_message;
 
-  typedef pmap<string, NotifyCategory *> Categories;
+  // This shouldn't be a pmap, since it might be invoked before we
+  // initialize the global malloc pointers.
+  typedef map<string, NotifyCategory *> Categories;
   Categories _categories;
 
   static Notify *_global_ptr;

+ 2 - 2
dtool/src/prc/prcKeyRegistry.h

@@ -27,7 +27,7 @@
 
 #ifdef HAVE_OPENSSL
 
-#include "pvector.h"
+#include <vector>
 #include "openssl/evp.h"
 
 // Some versions of OpenSSL appear to define this as a macro.  Yucky.
@@ -74,7 +74,7 @@ private:
     time_t _generated_time;
   };
 
-  typedef pvector<Key> Keys;
+  typedef vector<Key> Keys;
   Keys _keys;
 
   static PrcKeyRegistry *_global_ptr;