[Ecls-list] Lisp errors & ERRNO

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue Mar 16 19:01:20 UTC 2010


On Tue, Mar 16, 2010 at 5:49 PM, Tobias C. Rittweiler <tcr at freebits.de>wrote:

> So I'm wondering about Windows. FElibc_error is not conditionalized out
> on Windows -- so however ECL is build there, strerror(3) must be
> available there, too?
>
> I was about making EXT:STRERROR (the lisp function) expect an error code
> (as returned by GetLastError()) on Windows. Is errno used in Windows at
> all?
>

GetLastError() and strerror() are different functions. The former relates to
internal calls and is used by FEwin32_error, while the latter provides error
messages for the C library, and uses different error codes

strerror() is ANSI and is provided by Windows
http://msdn.microsoft.com/en-us/library/aa272975%28VS.60%29.aspx
Since ECL expects at least an ANSIC C compiler there is no
conditionalization

Given that strerror() is not thread safe, on Windows we may consider using
instead an internal variable, _sys_errlist
http://msdn.microsoft.com/en-us/library/aa246793%28VS.60%29.aspx
and conditionally use strerror_r() on all other platforms.

But these are things I can add later on if you already have a prototype for
strerror.

Juanjo

-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100316/0bb8f190/attachment.html>


More information about the ecl-devel mailing list