[ekiga] Made stdout/stderr work correctly under windows 7 (and possibly windows vista)
- From: Julien Puydt <jpuydt src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga] Made stdout/stderr work correctly under windows 7 (and possibly windows vista)
- Date: Mon, 29 Jun 2009 12:13:10 +0000 (UTC)
commit daf4ff1f453387f476b6c1bf88713fd381a4c049
Author: Julien Puydt <jpuydt gnome org>
Date: Mon Jun 29 14:07:42 2009 +0200
Made stdout/stderr work correctly under windows 7 (and possibly windows vista)
Patch from Michael Rickmann
src/gui/main.cpp | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/main.cpp b/src/gui/main.cpp
index e859976..aeb8de3 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -4410,6 +4410,13 @@ main (int argc,
text_label = g_strdup_printf ("PTLIB_TRACE_CODECS_USER_PLANE=%d", debug_level_up);
_putenv (text_label);
g_free (text_label);
+ if (debug_level != 0) {
+ std::string desk_path = g_get_user_special_dir (G_USER_DIRECTORY_DESKTOP);
+ if (!desk_path.empty ()) {
+ std::freopen((desk_path + "\\ekiga-stdout.txt").c_str (), "w", stdout);
+ std::freopen((desk_path + "\\ekiga-stderr.txt").c_str (), "w", stderr);
+ }
+ }
#endif
/* Ekiga initialisation */
@@ -4579,9 +4586,6 @@ APIENTRY WinMain (HINSTANCE hInstance,
/* use msvcrt.dll to parse command line */
__getmainargs (&argc, &argv, &env, 0, &info);
- std::freopen("stdout.txt", "w", stdout);
- std::freopen("stderr.txt", "w", stderr);
-
iresult = main (argc, argv, env);
}
CloseHandle (ekr_mutex);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]