On Tue, Mar 16, 2010 at 5:49 PM, Tobias C. Rittweiler <firstname.lastname@example.org> 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
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
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
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.
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)