[llvm-commits] [PATCH] work around a nasty g++/glibc incompatiblity
Benjamin Kramer
benny.kra at googlemail.com
Sun Jun 14 03:55:09 PDT 2009
Török Edwin wrote:
> The GNU version always returns a pointer to the error message, it may or
> may not use the buffer supplied.
> (I think it doesn't use the buffer if it can return a pointer to the
> error message table).
> Accessing the returned pointer is thread safe in either case, so you
> could check if the returned value == buffer, and if not copy it to
> buffer. It would still be thread safe.
Here's a thread safe codepath for GNU's strerror_r.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: glibcstrerror_r.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20090614/6185a4a6/attachment.ksh>
More information about the llvm-commits
mailing list