PR 67414 Better diagnostics on backtrace failure, gf_strerror bugfix
commit429cbefb0c58cec01636c90507e3b5b8211ae4ab
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Sep 2015 14:51:40 +0000 (2 14:51 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Sep 2015 14:51:40 +0000 (2 14:51 +0000)
tree10abb98957304dbdbbb310cad62b7d3c654bb167
parentff06a77acebf6e0d0044612c44cb0dad74fac688
PR 67414 Better diagnostics on backtrace failure, gf_strerror bugfix

2015-09-02  Janne Blomqvist  <jb@gcc.gnu.org>

PR libfortran/67414
* io/write.c (gfc_itoa): Move to runtime/string.c.
* libgfortran.h (show_backtrace): Make arg bool.
(gfc_itoa): New prototype.
* runtime/backtrace.c (struct mystate): Change type of try_simple
field, add in_signal_handler field.
(error_callback): Print out error number, or if not in a signal
handler, the error message.
(show_backtrace): Change type of arg, change initialization of
struct mystate.
(backtrace): Call show_backtrace with correct arg type.
* runtime/compile_options.c (backtrace_handler): Call with correct
arg type.
* runtime/error.c (sys_abort): Likewise.
(gf_strerror): Handle newlocale() failure.
* runtime/string.c (gfc_itoa): Function moved here from
io/write.c.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227404 138bc75d-0d04-0410-961f-82ee72b054a4
libgfortran/ChangeLog
libgfortran/io/write.c
libgfortran/libgfortran.h
libgfortran/runtime/backtrace.c
libgfortran/runtime/compile_options.c
libgfortran/runtime/error.c
libgfortran/runtime/string.c