efl: add binary mode to fdopen() calls

This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Vincent Torri 2015-12-03 10:52:56 +01:00 committed by Cedric BAIL
parent 3b44645363
commit 4f242fb48a
4 changed files with 4 additions and 4 deletions

View File

@ -193,7 +193,7 @@ sc_eofsrc(void *handle)
void *
sc_openasm(int fd)
{
return fdopen(fd, "w+");
return fdopen(fd, "wb+");
}
void

View File

@ -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);

View File

@ -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

View File

@ -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);