Re: [PATCH] newlib: Simplify errno access

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
Hi Paul,

On Aug 30 21:19, Paul Cercueil wrote:
> I see no reason why every single errno access (read or write) should
> trigger a function call to just return an offset into the reent struct.
> 
> This seems to have been needed in the past, but it does not seem to be
> needed anymore.
> 
> Drop the __errno() function, and set the 'errno' macro to point to the
> corresponding offset into the _reent struct.

You can't do that unconditionally.  The __errno function is exported
from the Cygwin DLL and actually used by applications.  So the __errno
function must exist and return a useful value for backward compat, even
if it's not used by newly compiled code.


Thanks,
Corinna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.