From 0ae9a55bdb33b7af2fc40a6629e877fedddb662b Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 11 Nov 2008 02:00:12 +0000 Subject: [PATCH] fix static-init order issue --- dtool/src/prc/configPageManager.cxx | 7 +++++++ dtool/src/prc/config_prc.cxx | 12 ------------ dtool/src/prc/config_prc.h | 4 ---- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/dtool/src/prc/configPageManager.cxx b/dtool/src/prc/configPageManager.cxx index 163a2953f7..81df13c45c 100644 --- a/dtool/src/prc/configPageManager.cxx +++ b/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 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 } diff --git a/dtool/src/prc/config_prc.cxx b/dtool/src/prc/config_prc.cxx index 644639e77b..8ab79bfdfe 100644 --- a/dtool/src/prc/config_prc.cxx +++ b/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 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 diff --git a/dtool/src/prc/config_prc.h b/dtool/src/prc/config_prc.h index f472be3ddc..321a6db00d 100644 --- a/dtool/src/prc/config_prc.h +++ b/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 newline_mode; -#endif - #endif