Clean up some ifdefs

Thankfully somebody already made a define for this, they
just never used it...
This commit is contained in:
TingPing 2015-02-28 06:42:20 -05:00
parent 97bf0de016
commit a5584c6b57
1 changed files with 3 additions and 11 deletions

View File

@ -176,11 +176,7 @@ scrollback_shrink (session *sess)
p++; p++;
} }
#ifdef WIN32 fh = g_open (file, O_CREAT | O_TRUNC | O_APPEND | O_WRONLY | OFLAGS, 0644);
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
g_free (file); g_free (file);
if (fh == -1) if (fh == -1)
{ {
@ -236,7 +232,7 @@ scrollback_save (session *sess, char *text)
if ((buf = scrollback_get_filename (sess)) == NULL) if ((buf = scrollback_get_filename (sess)) == NULL)
return; 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); g_free (buf);
if (sess->scrollfd == -1) if (sess->scrollfd == -1)
return; return;
@ -595,11 +591,7 @@ log_open_file (char *servname, char *channame, char *netname)
if (!file) if (!file)
return -1; return -1;
#ifdef WIN32 fd = g_open (file, O_CREAT | O_APPEND | O_WRONLY | OFLAGS, 0644);
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
g_free (file); g_free (file);
if (fd == -1) if (fd == -1)