A getxxx_r version patch
Thorsten Kukuk
kukuk@suse.de
Sat Jul 10 08:20:00 GMT 1999
On Sat, Jul 10, H.J. Lu wrote:
> >
> > Date: Fri, 9 Jul 1999 16:28:52 -0700 (PDT)
> > From: hjl@varesearch.com (H.J. Lu)
> >
> > Since we changed the return value of getxxx_r, I added a new version
> > for each function and kept the old one.
> >
> > 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.
Thorsten
--
Thorsten Kukuk http://www.suse.de/~kukuk/ kukuk@suse.de
SuSE GmbH Deutschherrenstr. 15-19 90429 Nuernberg
Linux is like a Vorlon. It is incredibly powerful, gives terse,
cryptic answers and has a lot of things going on in the background.
More information about the Libc-hacker
mailing list