[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setlocale - incorrect error signalled

From: Kevin Ryde
Subject: Re: setlocale - incorrect error signalled
Date: Sat, 22 Jan 2005 08:49:42 +1100
User-agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux)

Bruno Haible <address@hidden> writes:
> "No such file or directory" is incorrect.

glibc does end up setting that, it's not just what was left there from

> setlocale() is not required to set errno when it fails,


>   rv = setlocale (scm_i_to_lc_category (category, 1), clocale);
>   if (rv == NULL)
>     SCM_SYSERROR;     <=== This is the problem.

Could force an errno=EINVAL in there, so that's always the error
given.  Or alternately put errno=EINVAL before the setlocale, as a
default if setlocale doesn't change errno.  I suppose the former might
be most standards-compliant.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]