cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4f242fb48a5cf18b6e5ea6598681486abf791771

commit 4f242fb48a5cf18b6e5ea6598681486abf791771
Author: Vincent Torri <vincent dot torri at gmail dot com>
Date:   Thu Dec 3 10:52:56 2015 +0100

    efl: add binary mode to fdopen() calls
    
    This allows better compatibility with Windows
    
    Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 src/bin/embryo/embryo_cc_sc1.c | 2 +-
 src/lib/edje/edje_edit.c       | 2 +-
 src/lib/elua/cache.c           | 2 +-
 src/tests/elua/elua_lib.c      | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/embryo/embryo_cc_sc1.c b/src/bin/embryo/embryo_cc_sc1.c
index 30a5329..b5d0c4f 100644
--- a/src/bin/embryo/embryo_cc_sc1.c
+++ b/src/bin/embryo/embryo_cc_sc1.c
@@ -193,7 +193,7 @@ sc_eofsrc(void *handle)
 void               *
 sc_openasm(int fd)
 {
-   return fdopen(fd, "w+");
+   return fdopen(fd, "wb+");
 }
 
 void
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index f714fc3..f4f282a 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -10156,7 +10156,7 @@ _edje_edit_embryo_rebuild(Edje_Edit *eed)
    if (fd < 0)
      return EINA_FALSE;  /* FIXME: report something */
 
-   f = fdopen(fd, "w");
+   f = fdopen(fd, "wb");
    if (!f)
      {
         close(fd);
diff --git a/src/lib/elua/cache.c b/src/lib/elua/cache.c
index 99d7b6a..d03d9bf 100644
--- a/src/lib/elua/cache.c
+++ b/src/lib/elua/cache.c
@@ -80,7 +80,7 @@ bc_tmp_open(const char *fname, char *buf, size_t buflen)
 #endif
    if (fd < 0)
      return NULL;
-   return fdopen(fd, "w");
+   return fdopen(fd, "wb");
 }
 
 static void
diff --git a/src/tests/elua/elua_lib.c b/src/tests/elua/elua_lib.c
index aecc26a..ef043ba 100644
--- a/src/tests/elua/elua_lib.c
+++ b/src/tests/elua/elua_lib.c
@@ -98,7 +98,7 @@ START_TEST(elua_api)
 
     fd = mkstemp(buf);
     fail_if(fd < 0);
-    f = fdopen(fd, "w");
+    f = fdopen(fd, "wb");
     fail_if(!f);
     fprintf(f, "return 5\n");
     fclose(f);

-- 


Reply via email to