1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +02:00

Fixed some portability bugs (patch #5271)

This commit is contained in:
Sebastien Helleu
2006-10-12 17:16:14 +00:00
parent 481e6f8e7f
commit 9b91c91577
16 changed files with 38 additions and 28 deletions
+4
View File
@@ -28,7 +28,11 @@
#include <unistd.h>
#include <string.h>
#include <stdarg.h>
#ifdef HAVE_FLOCK
#include <sys/file.h>
#endif
#include <sys/types.h>
#include <time.h>
+3 -3
View File
@@ -1873,7 +1873,7 @@ config_read ()
return -2;
snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME,
weechat_home, DIR_SEPARATOR);
if ((file = fopen (filename, "rt")) == NULL)
if ((file = fopen (filename, "r")) == NULL)
{
gui_printf (NULL, _("%s config file \"%s\" not found.\n"),
WEECHAT_WARNING, filename);
@@ -2158,7 +2158,7 @@ config_create_default ()
return -2;
snprintf (filename, filename_length, "%s%s" WEECHAT_CONFIG_NAME,
weechat_home, DIR_SEPARATOR);
if ((file = fopen (filename, "wt")) == NULL)
if ((file = fopen (filename, "w")) == NULL)
{
gui_printf (NULL, _("%s cannot create file \"%s\"\n"),
WEECHAT_ERROR, filename);
@@ -2365,7 +2365,7 @@ config_write (char *config_name)
weechat_home, DIR_SEPARATOR);
}
if ((file = fopen (filename, "wt")) == NULL)
if ((file = fopen (filename, "w")) == NULL)
{
gui_printf (NULL, _("%s cannot create file \"%s\"\n"),
WEECHAT_ERROR, filename);