From a576499d1b887c34ad9379e5745126d886f578cb Mon Sep 17 00:00:00 2001 From: Krzysztof Mazur Date: Sat, 16 Mar 2013 13:51:07 +0100 Subject: [PATCH 3/3] gconf: use "binary" files Signed-off-by: Krzysztof Mazur --- src/gconf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gconf.c b/src/gconf.c index 8ddef22..f2d93f1 100644 --- a/src/gconf.c +++ b/src/gconf.c @@ -436,7 +436,7 @@ gint gconf_config_save(void) filename = g_build_filename(config_dir, AR2C_GCONF_CONFIG_FILENAME, NULL); - channel = g_io_channel_new_file(filename, "w", &error); + channel = g_io_channel_new_file(filename, "wb", &error); if (channel != NULL) { data = g_key_file_to_data(gconf_config, &size, &error); if (data != NULL) { @@ -528,7 +528,7 @@ void open_file(const char *filename) { FILE *f; - f = fopen(filename, "r"); + f = fopen(filename, "rb"); if (f == NULL) { fprintf(stderr, "error\n"); return; @@ -713,7 +713,7 @@ void load_data(const char *filename) { FILE *f; - f = fopen(filename, "r"); + f = fopen(filename, "rb"); if (f == NULL) { fprintf(stderr, "error\n"); return; @@ -731,7 +731,7 @@ void save_file(const char *filename) FILE *f; int ret; - f = fopen(filename, "w"); + f = fopen(filename, "wb"); if (f == NULL) { fprintf(stderr, "error\n"); return; -- 1.8.2.rc1.362.gc8d5142