[adding bug-gnulib]
On 11/08/2010 12:23 PM, Daniel P. Berrange wrote:
On Mon, Nov 08, 2010 at 02:02:06PM -0500, Adam Stokes wrote:
> +
> +char *strerror_r(int errnum, char *buf, size_t buflen) {
> + return strerror(errnum);
> +}
strerror() is absolutely not threadsafe, so this is dangerous.
strerror_r has its own set of portability problems, since the glibc
signature disagrees with the POSIX signature. It also has not yet been
ported to gnulib (in either the POSIX or glibc variant). That might be
a useful project to tackle first.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org