[ekiga/gnome-2-26] Made stdout/stderr work correctly under windows 7 (and possibly windows vista)
- From: Eugen Dedu <ededu src gnome org>
- To: svn-commits-list gnome org
- Subject: [ekiga/gnome-2-26] Made stdout/stderr work correctly under windows 7 (and possibly windows vista)
- Date: Sat, 18 Jul 2009 19:43:26 +0000 (UTC)
commit 5410a9e48c6496b3964a8943968d457699780a93
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 9fbf66e..fbbf17c 100644
--- a/src/gui/main.cpp
+++ b/src/gui/main.cpp
@@ -4457,6 +4457,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 */
@@ -4626,9 +4633,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]