mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 00:10:59 +00:00
try to avoid initailizaton problems with global debugstream variable.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8011 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
5f3e824d2c
commit
d66e61a93c
@ -1,3 +1,11 @@
|
||||
2003-11-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* debug.C: only use the default constructor for debugstream
|
||||
(lyxerr) here.
|
||||
|
||||
* main.C (main): include debug.h and setup the lyxerr streambuf
|
||||
here.
|
||||
|
||||
2003-10-31 José Matos <jamatos@lyx.org>
|
||||
|
||||
* paragraph_funcs.C (addDepth, asciiParagraph): move from buffer.C
|
||||
|
@ -123,4 +123,4 @@ void lyx_debug_trait::showTags(ostream & os)
|
||||
os.flush();
|
||||
}
|
||||
|
||||
LyXErr lyxerr(std::cerr.rdbuf());
|
||||
LyXErr lyxerr;
|
||||
|
@ -11,6 +11,7 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "debug.h"
|
||||
#include "lyx_main.h"
|
||||
#include "gettext.h"
|
||||
#include "support/os.h"
|
||||
@ -28,6 +29,10 @@ int main(int argc, char * argv[])
|
||||
#ifdef HAVE_IOS
|
||||
std::ios_base::sync_with_stdio(false);
|
||||
#endif
|
||||
// To avoid ordering of global object problems with some
|
||||
// stdlibs we do the initialization here, but still as
|
||||
// early as possible.
|
||||
lyxerr.rdbuf(std::cerr.rdbuf());
|
||||
|
||||
os::init(&argc, &argv);
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2003-11-01 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* debugstream.h: add a default constructor that does not setup a
|
||||
streambuf here.
|
||||
|
||||
2003-10-14 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* socktools.C: honor CXX_GLOBAL_CSTD
|
||||
|
@ -44,6 +44,10 @@ public:
|
||||
typedef dtrait debug;
|
||||
typedef typename debug::type Type;
|
||||
|
||||
basic_debugstream()
|
||||
: std::basic_ostream<charT, traits>(0), dt(debug::NONE)
|
||||
{}
|
||||
|
||||
/// Constructor, sets the debug level to t.
|
||||
explicit basic_debugstream(std::basic_streambuf<charT, traits> * buf)
|
||||
: std::basic_ostream<charT, traits>(buf), dt(debug::NONE)
|
||||
|
Loading…
Reference in New Issue
Block a user