A getxxx_r version patch

H.J. Lu hjl@lucon.org
Sat Jul 10 08:28:00 GMT 1999


> > > 
> > > I think you should also set errno since the new functions do not
> > > necessarily do this.  The whole point of having getXXbyYY_r returning
> > > the error value is avoiding the use of thread-specific data.
> > > 
> > 
> > I don't know what you mean. The new functions return "errno" in case
> > of errors. Why do you want to set "errno" with "errno"?
> 
> The old functions sets errno and returns -1. But POSIX only says,
> that the functions should return the errno value, and not setting errno.
> So if the next functions or a later version will only return the errno
> value, and doesn't set errno, your "old" functions will not longer work.
> 

My patch is based on the current implementation which does set errno.
If we ever change this, we can deal it later. BTW, if we have to do
that, it won't be the only place we have to change.

-- 
H.J. Lu (hjl@gnu.org)


More information about the Libc-hacker mailing list