On Fri, May 30, 2008 at 1:21 PM, Mark Hoemmen <<a href="mailto:mark.hoemmen@gmail.com">mark.hoemmen@gmail.com</a>> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="Ih2E3d">Juan Jose Garcia-Ripoll wrote:<br>
</div><div class="Ih2E3d">> On Fri, May 30, 2008 at 7:09 PM, Waldek Hebisch<br>
> <<a href="mailto:hebisch@math.uni.wroc.pl">hebisch@math.uni.wroc.pl</a>> wrote:<br>
>> Presumably ECL can decide if a file is Lisp source or not.  If it<br>
>> is not a Lisp source than it is a fasl or invalid file.  I would<br>
>> think that 'dlopen' (or equivalent) can report to ECL errors<br>
>> due to loading of invalid binaries.<br>
><br>
> Unfortunately, this is not true. We cannot rely on in the dynamic<br>
> linker to detect whether a file is binary or not. This caused serious<br>
> problems in some ports, some time ago. Instead of returning -1 and<br>
> failing, the linker would bother the user with error messages about<br>
> corrupt binaries, and so on. I think this happened mainly in the<br>
> Windows port, but it is nonetheless too unsafe to rely on that.<br>
<br>
</div>Furthermore, if the system's implementation of dlopen() happens to be<br>
broken, then trying to link an invalid object file could cause troubles.<br>
<br>
I imagine one could store the object file suffix that ECL uses, and then<br>
use that to guess the file suffix.  So if you try<br>
<br>
(load "baz")<br>
<br>
it would first look for "baz.lisp", and if that file didn't exist, it<br>
would try "baz.fas" or whatever ECL uses for the object file suffix.<br>
</blockquote><div><br>I'm pretty sure ECL already does this. The problem is when the file is actually called "baz".<br><br>Isn't there a "external-format" parameter to load that allows you to specify the type? Is this something that can be done with this?<br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
This seems easy enough to implement that those who desire the feature<br>
could submit their own patch and not pester our hard-working Juanjo<br>
about it, no? ;-)<br>
<br>
mfh<br>
<div><div></div><div class="Wj3C7c"><br>
-------------------------------------------------------------------------<br>
This SF.net email is sponsored by: Microsoft<br>
Defy all challenges. Microsoft(R) Visual Studio 2008.<br>
<a href="http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/" target="_blank">http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/</a><br>
_______________________________________________<br>
Ecls-list mailing list<br>
<a href="mailto:Ecls-list@lists.sourceforge.net">Ecls-list@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/ecls-list" target="_blank">https://lists.sourceforge.net/lists/listinfo/ecls-list</a><br>
</div></div></blockquote></div><br>