On Tue, Mar 16, 2010 at 5:49 PM, Tobias C. Rittweiler <tcr@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