diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-10 01:28:20 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-08-10 01:28:20 +0900 |
| commit | 37016c65875986a098d4ad6ca9f138064932b137 (patch) | |
| tree | 2193af7e0b22c37bc4681bda52070199d62be0bb /src/console.h | |
| parent | e8e3a6f259ab74c486aec9b5ea95d3e1f5068f6c (diff) | |
global cout and cerr is now retrieved using global::cout() and global::cerr()
This is necessary to avoid global variable initialization order
problem.
Diffstat (limited to 'src/console.h')
| -rw-r--r-- | src/console.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/console.h b/src/console.h index bb3121b8..68643516 100644 --- a/src/console.h +++ b/src/console.h @@ -48,19 +48,17 @@ namespace aria2 { namespace global { #ifdef __MINGW32__ -extern SharedHandle<WinConsoleFile> cout; +const SharedHandle<WinConsoleFile>& cout(); #else // !__MINGW32__ -extern SharedHandle<BufferedFile> cout; +const SharedHandle<BufferedFile>& cout(); #endif // !__MINGW32__ #ifdef __MINGW32__ -extern SharedHandle<WinConsoleFile> cerr; +const SharedHandle<WinConsoleFile>& cerr(); #else // !__MINGW32__ -extern SharedHandle<BufferedFile> cerr; +const SharedHandle<BufferedFile>& cerr(); #endif // !__MINGW32__ -void initConsole(); - } // namespace global } // namespace aria2 |
