diff src/util.c @ 10203:7ff9b8b22e7d

[gaim-migrate @ 11324] gaim_mkstemp can now create binary files committer: Tailor Script <tailor@pidgin.im>
author Herman Bloggs <hermanator12002@yahoo.com>
date Thu, 18 Nov 2004 17:05:40 +0000
parents 1a91e814e9d8
children 357d4fa1bfbe
line wrap: on
line diff
--- a/src/util.c	Wed Nov 17 23:54:24 2004 +0000
+++ b/src/util.c	Thu Nov 18 17:05:40 2004 +0000
@@ -1942,7 +1942,7 @@
 static const char *gaim_mkstemp_templ = {"gaimXXXXXX"};
 
 FILE *
-gaim_mkstemp(char **fpath)
+gaim_mkstemp(char **fpath, gboolean binary)
 {
 	const gchar *tmpdir;
 #ifndef _WIN32
@@ -1961,7 +1961,7 @@
 						   "Problem creating the template\n");
 			else
 			{
-				if( (fp = fopen( result, "w+" )) == NULL ) {
+				if( (fp = fopen( result, binary?"wb+":"w+")) == NULL ) {
 					gaim_debug(GAIM_DEBUG_ERROR, "gaim_mkstemp",
 							   "Couldn't fopen() %s\n", result);
 				}