mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -158,8 +158,14 @@ qof_log_init_filename(const gchar* log_filename)
|
|||||||
|
|
||||||
if ((fd = g_mkstemp(fname)) != -1)
|
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);
|
g_rename(fname, log_filename);
|
||||||
fout = fdopen(fd, "w");
|
fout = fdopen(fd, "w");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user