Skip Menu |
 

Subject: use strerror_r
We should use strerror_r instead of strerror when it's available.
Revision 17939 includes part of this fix.
From: raeburn@mit.edu
Subject: CVS Commit
* configure.in: Check for strerror_r.

Commit By: raeburn



Revision: 17941
Changed Files:
U trunk/src/configure.in
From: raeburn@mit.edu
Subject: CVS Commit
* error_table.h (ET_EBUFSIZ): Increase to 1k.
* error_message.c (get_thread_buffer): New function, split out from
error_message.
(error_message): Call it. Also try strerror_r with the per-thread buffer, if
both are available, before trying strerror.

Commit By: raeburn



Revision: 17942
Changed Files:
U trunk/src/util/et/error_message.c
U trunk/src/util/et/error_table.h
From: raeburn@mit.edu
Subject: CVS Commit
* errors.c (krb5int_get_error): Try strerror_r if available before strerror.
* plugins.c (ERRSTR): New macro, tries strerror_r and uses strerror only if it
fails or isn't available.
(krb5int_open_plugin_dir): Use it.

Commit By: raeburn



Revision: 17944
Changed Files:
U trunk/src/util/support/errors.c
U trunk/src/util/support/plugins.c
There are still some places where strerror is used and strerror_r is
not, but I believe now they're limited to non-threaded programs,
libraries we haven't made thread-safe, or functions in thread-safe
library sources which are actually compiled only when we're building
test programs.