Tony Finch wrote:
>
> Ben Laurie <ben@algroup.co.uk> wrote:
> >
> >getpwnam _does_ exist in the threaded library - so I'd guess it is
> >reentrant. It's just that getpwnam_r doesn't exist.
>
> No, the API prevents it from being re-entrant: subsequent calls to
> getpw* functions may alter the contents of the memory pointed to by
> the return value. It exists in libc_r because libc_r is a replacement
> for libc so it must include every function.
So we need to make it threadsafe when its missing, then?
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff
|