summary refs log tree commit diff stats
path: root/src/common/text.c
diff options
context:
space:
mode:
authorTingPing <tingping@tingping.se>2015-02-28 06:42:20 -0500
committerTingPing <tingping@tingping.se>2015-02-28 06:43:33 -0500
commita5584c6b575b6239d048b5adb260068a6783dbad (patch)
tree5f33c564c855524920905dd7105a0395e7e6bbe1 /src/common/text.c
parent97bf0de0161b835d8fe23915b02f04d5da4c34ed (diff)
Clean up some ifdefs
Thankfully somebody already made a define for this, they
just never used it...
Diffstat (limited to 'src/common/text.c')
-rw-r--r--src/common/text.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/common/text.c b/src/common/text.c
index ae18b8e6..e8243833 100644
--- a/src/common/text.c
+++ b/src/common/text.c
@@ -176,11 +176,7 @@ scrollback_shrink (session *sess)
 		p++;
 	}
 
-#ifdef WIN32
-	fh = g_open (file, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY | _O_BINARY, 0644);
-#else
-	fh = g_open (file, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY, 0644);
-#endif
+	fh = g_open (file, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY | OFLAGS, 0644);
 	g_free (file);
 	if (fh == -1)
 	{
@@ -236,7 +232,7 @@ scrollback_save (session *sess, char *text)
 		if ((buf = scrollback_get_filename (sess)) == NULL)
 			return;
 
-		sess->scrollfd = g_open (buf, O_CREAT | O_APPEND | O_WRONLY, 0644);
+		sess->scrollfd = g_open (buf, O_CREAT | O_APPEND | O_WRONLY | OFLAGS, 0644);
 		g_free (buf);
 		if (sess->scrollfd == -1)
 			return;
@@ -595,11 +591,7 @@ log_open_file (char *servname, char *channame, char *netname)
 	if (!file)
 		return -1;
 
-#ifdef WIN32
-	fd = g_open (file, O_CREAT | O_APPEND | O_WRONLY | _O_BINARY, S_IREAD|S_IWRITE);
-#else
-	fd = g_open (file, O_CREAT | O_APPEND | O_WRONLY, 0644);
-#endif
+	fd = g_open (file, O_CREAT | O_APPEND | O_WRONLY | OFLAGS, 0644);
 	g_free (file);
 
 	if (fd == -1)