On Thu, Nov 11, 2010 at 01:26:37PM +0100, Bruno Haible wrote: > > Here's a draft proposal: A new module 'strerror_r-posix'. I wouldn't want > > to call it 'strerror_r' because that would be misunderstandable. > > During testing, more portability problems appeared. Here's what I'm > committing: > > #else /* (__GLIBC__ >= 2 ? !HAVE___XPG_STRERROR_R : !HAVE_DECL_STRERROR_R) || > EXTEND_STRERROR_R */ > > # include "glthread/lock.h" > > /* Use strerror(), with locking. */ > > /* This lock protects the buffer returned by strerror(). We assume that > no other uses of strerror() exist in the program. */ > gl_lock_define_initialized(static, strerror_lock)
It'd be good to have an impl that uses strerror_s() on Win32 since I don't think it is safe to assume that all other libraries linked against will have strerror() usage protected by the gnulib lock. Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://deltacloud.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|
