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)
committerRyan Lortie <desrt@desrt.ca>
Mon, 3 Jun 2013 21:49:06 +0000 (17:49 -0400)
commite40435e834b4da4e791dd6c67ffc8bf285b777fd
tree025dfc7a4ff0018445cef21a3ae702f88e53d4b8
parentc152ceba090840be100ae6eeb90b639b85420ec7
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