<div class="gmail_quote">On Tue, Feb 8, 2011 at 4:35 PM, Didier Verna <span dir="ltr"><<a href="mailto:didier@lrde.epita.fr">didier@lrde.epita.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Hello,<br>
<br>
after a git upgrade today, I think there's a bug related to getenv in<br>
standalone executables. To reproduce, put this in test.lisp:</blockquote><div><br></div><div>It depends on whether you call it a bug or a feature. Most POSIX functions only accept base-strings. READ-LINE may return an ordinary Unicode string, which is not compatible with the POSIX calls.</div>
<div><br></div><div><div><div>> (read-line)</div><div>PATH</div><div><br></div><div>"PATH"</div><div>NIL</div><div>> (type-of *)</div><div><br></div><div>(SIMPLE-ARRAY CHARACTER (4))</div><div>> (ext:getenv **)</div>
<div><br></div><div>Condition of type: SIMPLE-TYPE-ERROR</div><div>In function GETENV, the value of argument is</div><div> "PATH"</div><div>which is not of expected type BASE-STRING</div><div><br></div></div>
</div><div>Nothing has changed in ECL, it is just that Unicode builds are now the default and it triggered this unexpected condition. I just changed GETENV to coerce its input to the appropriate type.</div><div><br></div>
<div>Juanjo</div></div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://juanjose.garciaripoll.googlepages.com" target="_blank">http://juanjose.garciaripoll.googlepages.com</a><br>