[Patch, libfortran] PR46267 strerror() might not be thread-safe

Jack Howarth howarth@bromo.med.uc.edu
Fri Jan 21 14:11:00 GMT 2011


On Fri, Jan 21, 2011 at 03:00:11PM +0200, Janne Blomqvist wrote:
> On Thu, Jan 20, 2011 at 20:11, Janne Blomqvist
> <blomqvist.janne@gmail.com> wrote:
> > Hello,
> >
> > POSIX does not require strerror() to be thread-safe (although some
> > implementations are), using it is thus a potential error in
> > libgfortran. The attached patch fixes this in the case that
> > strerror_r() is available; thanks to Jakub for the hint about
> > __builtin_classify_type.
> >
> > Regtested on x86_64-unknown-linux-gnu, Ok for trunk?
> 
> Some googling suggest TLS is not supported on all targets, so I'm
> withdrawing this patch and coming up with another solution.
> 

Janne,
   Which targets don't have any form of tls? I thought all of the
targets currently had either tls or emutls support.
             Jack

> -- 
> Janne Blomqvist



More information about the Gcc-patches mailing list