Browse Source

fix static-init order issue

David Rose 17 years ago
parent
commit
0ae9a55bdb
3 changed files with 7 additions and 16 deletions
  1. 7 0
      dtool/src/prc/configPageManager.cxx
  2. 0 12
      dtool/src/prc/config_prc.cxx
  3. 0 4
      dtool/src/prc/config_prc.h

+ 7 - 0
dtool/src/prc/configPageManager.cxx

@@ -352,6 +352,13 @@ reload_implicit_pages() {
 #ifdef USE_PANDAFILESTREAM
   // Update this very low-level config variable here, for lack of any
   // better place.
+  ConfigVariableEnum<PandaFileStreamBuf::NewlineMode> newline_mode
+    ("newline-mode", PandaFileStreamBuf::NM_native,
+     PRC_DESC("Controls how newlines are written by Panda applications writing "
+              "to a text file.  The default, \"native\", means to write newlines "
+              "appropriate to the current platform.  You may also specify \"binary\", "
+              "to avoid molesting the file data, or one of \"msdos\", \"unix\", "
+              "or \"mac\"."));
   PandaFileStreamBuf::_newline_mode = newline_mode;
 #endif  // USE_PANDAFILESTREAM
 }

+ 0 - 12
dtool/src/prc/config_prc.cxx

@@ -21,15 +21,3 @@ NotifyCategoryDef(prc, "");
 ConfigVariableBool assert_abort
 ("assert-abort", false,
  PRC_DESC("Set this true to trigger a core dump and/or stack trace when the first assertion fails"));
-
-#ifdef USE_PANDAFILESTREAM
-
-ConfigVariableEnum<PandaFileStreamBuf::NewlineMode> newline_mode
-("newline-mode", PandaFileStreamBuf::NM_native,
-  PRC_DESC("Controls how newlines are written by Panda applications writing "
-  "to a text file.  The default, \"native\", means to write newlines "
-  "appropriate to the current platform.  You may also specify \"binary\", "
-  "to avoid molesting the file data, or one of \"msdos\", \"unix\", "
-  "or \"mac\"."));
-  
-#endif  // USE_PANDAFILESTREAM

+ 0 - 4
dtool/src/prc/config_prc.h

@@ -24,9 +24,5 @@ NotifyCategoryDecl(prc, EXPCL_DTOOLCONFIG, EXPTP_DTOOLCONFIG);
 
 extern ConfigVariableBool assert_abort;
 
-#ifdef USE_PANDAFILESTREAM
-extern ConfigVariableEnum<PandaFileStreamBuf::NewlineMode> newline_mode;
-#endif
-
 #endif