diff options
author | Christian Biesinger <cbiesinger@google.com> | 2019-10-31 14:41:19 -0500 |
---|---|---|
committer | Christian Biesinger <cbiesinger@google.com> | 2019-10-31 15:14:14 -0500 |
commit | b231e86ac9608056ea837e24d42a878927f5787a (patch) | |
tree | 29b98002638e43c04d5a02a23501ea717932c750 /gdb/configure | |
parent | a2726d4ff80168a8134c68cb798e3f5f537b0eba (diff) | |
download | gdb-b231e86ac9608056ea837e24d42a878927f5787a.zip gdb-b231e86ac9608056ea837e24d42a878927f5787a.tar.gz gdb-b231e86ac9608056ea837e24d42a878927f5787a.tar.bz2 |
Use strerror_r in safe_strerror if available
Also stores the result in a thread-local static variable and
changes the return value to a const char*.
This is already important because Guile creates threads and
Python can create threads, but with the patch series here:
https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/176
GDB itself will create threads, too.
gdb/ChangeLog:
2019-10-31 Christian Biesinger <cbiesinger@google.com>
* configure: Regenerate.
* configure.ac: Check for strerror_r.
* gdbsupport/common-utils.h (safe_strerror): Change return value
to const char * and document that this function is now threadsafe.
* gdbsupport/posix-strerror.c (safe_strerror): Make buf
thread_local and call strerror_r, if available.
* utils.c (perror_string): Update.
(print_sys_errmsg): Update.
Change-Id: I81048fbaf148035c221c528727f7efe58ba528eb
Diffstat (limited to 'gdb/configure')
-rwxr-xr-x | gdb/configure | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/configure b/gdb/configure index e805903..018cc4b 100755 --- a/gdb/configure +++ b/gdb/configure @@ -13073,7 +13073,7 @@ for ac_func in getauxval getrusage getuid getgid \ sigaction sigsetmask socketpair \ ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ setrlimit getrlimit posix_madvise waitpid \ - ptrace64 sigaltstack setns use_default_colors + ptrace64 sigaltstack setns use_default_colors strerror_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |