MSVC compatibility: Somehow fdopen() doesn't work during the trace file initialization. Use fopen() instead.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18775 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-03-01 18:45:32 +00:00
parent 961539fc7c
commit b041e5dddf

View File

@ -158,8 +158,14 @@ qof_log_init_filename(const gchar* log_filename)
if ((fd = g_mkstemp(fname)) != -1)
{
#ifdef _MSC_VER
/* MSVC compiler: Somehow the OS thinks file descriptor from above
* still isn't open. So we open normally with the file name and that's it. */
fout = g_fopen(fname, "wb");
#else
g_rename(fname, log_filename);
fout = fdopen(fd, "w");
#endif
}
else
{