r15449 - gnucash/trunk/lib/libqof/qof - Replace mkstemp and rename by g_mkstemp and g_rename.
Andreas Köhler
andi5 at cvs.gnucash.org
Sun Jan 28 08:40:55 EST 2007
Author: andi5
Date: 2007-01-28 08:40:54 -0500 (Sun, 28 Jan 2007)
New Revision: 15449
Trac: http://svn.gnucash.org/trac/changeset/15449
Modified:
gnucash/trunk/lib/libqof/qof/qoflog.c
Log:
Replace mkstemp and rename by g_mkstemp and g_rename.
Mkstemp is unavailable on Windows and g_rename is preferred. Completes
r15435 on trunk and must not be backported.
Modified: gnucash/trunk/lib/libqof/qof/qoflog.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qoflog.c 2007-01-28 06:20:43 UTC (rev 15448)
+++ gnucash/trunk/lib/libqof/qof/qoflog.c 2007-01-28 13:40:54 UTC (rev 15449)
@@ -94,9 +94,9 @@
if(!fout) /* allow qof_log_set_file */
{
int fd;
- if ((fd = mkstemp(tempfile)) != -1)
+ if ((fd = g_mkstemp(tempfile)) != -1)
{
- rename(tempfile, fname);
+ g_rename(tempfile, fname);
fout = fdopen(fd, "w");
}
}
@@ -156,9 +156,9 @@
gchar *fname = g_strconcat(logfilename, ".XXXXXX", NULL);
int fd;
- if ((fd = mkstemp(fname)) != -1)
+ if ((fd = g_mkstemp(fname)) != -1)
{
- rename(fname, logfilename);
+ g_rename(fname, logfilename);
fout = fdopen(fd, "w");
}
else
More information about the gnucash-changes
mailing list