g_file_set_contents(): use unistd instead of stdio
authorRyan Lortie <desrt@desrt.ca>
Mon, 3 Jun 2013 21:49:06 +0000 (17:49 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 9 Jun 2013 22:15:26 +0000 (18:15 -0400)
commitdad3cb55cf357b3bae7f02bdc8fc4a8473db0388
treeaebf26b47c777f4e189c39034ca8c77708f4e5e6
parent75c0593a268b5ceb0cc7ac84d52e23a93a3f2e9d
g_file_set_contents(): use unistd instead of stdio

Use a normal write() system call instead of fdopen() and fwrite().

This will definitely work on UNIX system and should work on Windows as
well...

As an added bonus, we can use g_close() now as well.

https://bugzilla.gnome.org/show_bug.cgi?id=701560
glib/gfileutils.c