On Tue, 7 Jun 2011, Lucas De Marchi wrote:

On Tue, Jun 7, 2011 at 8:24 PM, Vincent Torri <vto...@univ-evry.fr> wrote:

Hey,

On windows, using open() followed by fopen() does not work. Hence, in
edje_cc, where mkstemp (which uses open) is followed by fopen, edje_cc
fails.

Instead of fopen, we can use fdopen. I pasted a  patch below. Can you
comment it (like, instead of keeping the filename in the function that i
modified, why not using it for the fd?

The patch looks a bit weird. IMO you should take one of the following
approaches (in order of preference):

1) Pass only the file descriptor instead of the filename. This way you
will write to the file descriptor recently opened by mkstemp.

compile_script_file() needs the filename (it is passed to embryo_cc)

Vincent

2) call close(fd) before calling create_script_file() and
compile_script_file(). This is very ugly thing that should work as
well, however one might argument that there's a race because the file
might disappear between the call to mkstemp() -- its creation -- and
the above functions.


regards,
Lucas De Marchi

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to