summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-12-03 09:32:39 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-12-05 21:04:36 +0100
commit3b44645363dcdd561edd9610a64f3d2c382753a9 (patch)
tree64f6c4a580e563e79ca3f1867ae510025052fd64 /src/bin
parentd2a7882b732b4cc3a8e7b11ec1c4336bdc2029bb (diff)
efl: add binary mode to f(re)open() calls
This allows better compatibility with Windows Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/edje/edje_codegen.c4
-rw-r--r--src/bin/edje/epp/cpplib.c2
-rw-r--r--src/bin/edje/epp/cpplib.h2
-rw-r--r--src/bin/edje/epp/cppmain.c2
-rw-r--r--src/bin/efl/efl_debugd.c2
5 files changed, 6 insertions, 6 deletions
diff --git a/src/bin/edje/edje_codegen.c b/src/bin/edje/edje_codegen.c
index f2ddc7f08b..0b2412fa37 100644
--- a/src/bin/edje/edje_codegen.c
+++ b/src/bin/edje/edje_codegen.c
@@ -387,11 +387,11 @@ _standardizes_header(const char *filename)
387static Eina_Bool 387static Eina_Bool
388_open_file_descriptors(const char *source, const char *header) 388_open_file_descriptors(const char *source, const char *header)
389{ 389{
390 header_fd = fopen(header, "w"); 390 header_fd = fopen(header, "wb");
391 if (!header_fd) 391 if (!header_fd)
392 return EINA_FALSE; 392 return EINA_FALSE;
393 393
394 source_fd = fopen(source, "w"); 394 source_fd = fopen(source, "wb");
395 if (!source_fd) 395 if (!source_fd)
396 goto err; 396 goto err;
397 397
diff --git a/src/bin/edje/epp/cpplib.c b/src/bin/edje/epp/cpplib.c
index b8e0ff2d64..0d2b5035c9 100644
--- a/src/bin/edje/epp/cpplib.c
+++ b/src/bin/edje/epp/cpplib.c
@@ -7492,7 +7492,7 @@ using_file(const char *filename, const char type)
7492 FILE *f = NULL; 7492 FILE *f = NULL;
7493 7493
7494 if (!options.watchfile) return; 7494 if (!options.watchfile) return;
7495 f = fopen(options.watchfile, "a"); 7495 f = fopen(options.watchfile, "ab");
7496 if (!f) return; 7496 if (!f) return;
7497 if (annotate) 7497 if (annotate)
7498 { 7498 {
diff --git a/src/bin/edje/epp/cpplib.h b/src/bin/edje/epp/cpplib.h
index c040ebddcc..18b66700e8 100644
--- a/src/bin/edje/epp/cpplib.h
+++ b/src/bin/edje/epp/cpplib.h
@@ -345,7 +345,7 @@ struct cpp_options {
345 345
346 char print_deps_missing_files; 346 char print_deps_missing_files;
347 347
348 /* If true, fopen (deps_file, "a") else fopen (deps_file, "w"). */ 348 /* If true, fopen (deps_file, "ab") else fopen (deps_file, "wb"). */
349 char print_deps_append; 349 char print_deps_append;
350 350
351 /* Nonzero means print names of header files (-H). */ 351 /* Nonzero means print names of header files (-H). */
diff --git a/src/bin/edje/epp/cppmain.c b/src/bin/edje/epp/cppmain.c
index 2e8059bf09..be04bac777 100644
--- a/src/bin/edje/epp/cppmain.c
+++ b/src/bin/edje/epp/cppmain.c
@@ -74,7 +74,7 @@ main(int argc, char **argv)
74 74
75 if (!opts->out_fname || !strcmp(opts->out_fname, "")) 75 if (!opts->out_fname || !strcmp(opts->out_fname, ""))
76 opts->out_fname = "stdout"; 76 opts->out_fname = "stdout";
77 else if (!freopen(opts->out_fname, "w", stdout)) 77 else if (!freopen(opts->out_fname, "wb", stdout))
78 cpp_pfatal_with_name(&parse_in, opts->out_fname); 78 cpp_pfatal_with_name(&parse_in, opts->out_fname);
79 79
80 for (i = 0;; i++) 80 for (i = 0;; i++)
diff --git a/src/bin/efl/efl_debugd.c b/src/bin/efl/efl_debugd.c
index a1025fbb4e..a07fe3fcee 100644
--- a/src/bin/efl/efl_debugd.c
+++ b/src/bin/efl/efl_debugd.c
@@ -129,7 +129,7 @@ _do(Client *c, char *op, unsigned char *d, int size)
129 c2->evlog_fetch_timer = ecore_timer_add(0.2, _cb_evlog, c2); 129 c2->evlog_fetch_timer = ecore_timer_add(0.2, _cb_evlog, c2);
130 snprintf(buf, sizeof(buf), "%s/efl_debug_evlog-%ld.log", 130 snprintf(buf, sizeof(buf), "%s/efl_debug_evlog-%ld.log",
131 getenv("HOME"), (long)c2->pid); 131 getenv("HOME"), (long)c2->pid);
132 c2->evlog_file = fopen(buf, "w"); 132 c2->evlog_file = fopen(buf, "wb");
133 } 133 }
134 } 134 }
135 } 135 }