src/util.c

changeset 10203
21d6c11a53c6
parent 10112
3133c5f8eb10
child 10258
21cfe876ca17
--- 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);
 				}

mercurial