strerror_r: Avoid clobbering the strerror buffer when possible.
authorBruno Haible <bruno@clisp.org>
Thu, 19 May 2011 18:57:21 +0000 (20:57 +0200)
committerBruno Haible <bruno@clisp.org>
Thu, 19 May 2011 18:57:21 +0000 (20:57 +0200)
commitf99411b3b5dec88d17532160071859649fa3a26c
tree28aad2a5785a89fa2ce751025fdd67b01e86a38d
parent4fe68d4176b4f0da64660bb9ce0f5412a6bb24de
strerror_r: Avoid clobbering the strerror buffer when possible.

* lib/strerror.c: Define _NETBSD_SOURCE. Include <nl_types.h>.
(sys_nerr, sys_errlist): New declarations.
(strerror_r): Be careful not to clobber the strerror buffer on NetBSD,
HP-UX, native Win32, IRIX, and 32-bit Solaris.
* m4/strerror_r.m4 (gl_PREREQ_STRERROR_R): Test whether catgets exists.
ChangeLog
lib/strerror_r.c
m4/strerror_r.m4