diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2018-09-21 21:12:59 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2018-09-21 21:12:59 +0300 |
commit | edaaef601d0d6d263fba87b42d6d04c99dd23dba (patch) | |
tree | 1eae37a9045b327759b9ea32319467c34314ddb6 /libgfortran/configure | |
parent | 5b4dd0158308d1a3effffd6316f1b39fdd1ad120 (diff) | |
download | gcc-edaaef601d0d6d263fba87b42d6d04c99dd23dba.zip gcc-edaaef601d0d6d263fba87b42d6d04c99dd23dba.tar.gz gcc-edaaef601d0d6d263fba87b42d6d04c99dd23dba.tar.bz2 |
Use vectored writes when reporting errors and warnings.
When producing error and warning messages, libgfortran writes a
message by using many system calls. By using vectored writes (the
POSIX writev function) when available and feasible to use without
major surgery, we reduce the chance that output gets intermingled with
other output to stderr.
In practice, this is done by introducing a new function estr_writev in
addition to the existing estr_write. In order to use this, the old
st_vprintf is removed, replaced by direct calls of vsnprintf, allowing
more message batching.
Regtested on x86_64-pc-linux-gnu.
libgfortran/ChangeLog:
2018-09-21 Janne Blomqvist <jb@gcc.gnu.org>
* config.h.in: Regenerated.
* configure: Regenerated.
* configure.ac: Check for writev and sys/uio.h.
* libgfortran.h: Include sys/uio.h.
(st_vprintf): Remove prototype.
(struct iovec): Define if not available.
(estr_writev): New prototype.
* runtime/backtrace.c (error_callback): Use estr_writev.
* runtime/error.c (ST_VPRINTF_SIZE): Remove.
(estr_writev): New function.
(st_vprintf): Remove.
(gf_vsnprintf): New function.
(ST_ERRBUF_SIZE): New macro.
(st_printf): Use vsnprintf.
(os_error): Use estr_writev.
(runtime_error): Use vsnprintf and estr_writev.
(runtime_error_at): Likewise.
(runtime_warning_at): Likewise.
(internal_error): Use estr_writev.
(generate_error_common): Likewise.
(generate_warning): Likewise.
(notify_std): Likewise.
* runtime/pause.c (pause_string): Likewise.
* runtime/stop.c (report_exception): Likewise.
(stop_string): Likewise.
(error_stop_string): Likewise.
From-SVN: r264487
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index a583b67..1c93683 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -2553,6 +2553,7 @@ as_fn_append ac_header_list " sys/times.h" as_fn_append ac_header_list " sys/resource.h" as_fn_append ac_header_list " sys/types.h" as_fn_append ac_header_list " sys/stat.h" +as_fn_append ac_header_list " sys/uio.h" as_fn_append ac_header_list " sys/wait.h" as_fn_append ac_header_list " floatingpoint.h" as_fn_append ac_header_list " ieeefp.h" @@ -2584,6 +2585,7 @@ as_fn_append ac_func_list " access" as_fn_append ac_func_list " fork" as_fn_append ac_func_list " setmode" as_fn_append ac_func_list " fcntl" +as_fn_append ac_func_list " writev" as_fn_append ac_func_list " gettimeofday" as_fn_append ac_func_list " stat" as_fn_append ac_func_list " fstat" @@ -12514,7 +12516,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12517 "configure" +#line 12519 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12620,7 +12622,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 12623 "configure" +#line 12625 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -16187,6 +16189,8 @@ done + + inttype_headers=`echo inttypes.h sys/inttypes.h | sed -e 's/,/ /g'` acx_cv_header_stdint=stddef.h @@ -16784,6 +16788,8 @@ done + + fi # Check strerror_r, cannot be above as versions with two and three arguments exist |