gcc/libgfortran
Janne Blomqvist edaaef601d 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
2018-09-21 21:12:59 +03:00
..
caf PR 84519 Handle optional QUIET specifier for STOP and ERROR STOP 2018-02-23 11:07:24 +02:00
config Update copyright years. 2018-01-03 11:03:58 +01:00
generated re PR fortran/37802 (Improve wording for matmul bound checking) 2018-09-16 19:37:44 +00:00
ieee Update copyright years. 2018-01-03 11:03:58 +01:00
intrinsics Include <sys/random.h> for getentropy on Solaris 2018-08-14 22:51:36 +00:00
io [libgfortran] Fix uninitialized variable use in fallback_access 2018-09-14 09:22:01 +00:00
m4 re PR fortran/37802 (Improve wording for matmul bound checking) 2018-09-16 19:37:44 +00:00
runtime Use vectored writes when reporting errors and warnings. 2018-09-21 21:12:59 +03:00
ChangeLog Use vectored writes when reporting errors and warnings. 2018-09-21 21:12:59 +03:00
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011 2012-01-09 Richard Guenther <rguenther@suse.de> 2012-01-09 10:11:38 +00:00
ChangeLog-2012 ChangeLog rotation. 2013-01-03 10:47:48 +01:00
ChangeLog-2013 Rotate ChangeLog for 2013. 2014-06-17 06:55:59 +03:00
ChangeLog-2014 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2015 Update copyright years. 2016-01-04 15:30:50 +01:00
ChangeLog-2016 Update copyright years. 2017-01-01 13:07:43 +01:00
ChangeLog-2017 Update copyright years. 2018-01-03 11:03:58 +01:00
Makefile.am re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
Makefile.in re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
acinclude.m4 Enable building libgfortran with Intel CET 2017-11-17 23:44:59 +01:00
aclocal.m4 Disable hwcaps on libgfortran 2016-12-12 13:40:21 +00:00
c99_protos.h Update copyright years. 2018-01-03 11:03:58 +01:00
config.h.in Use vectored writes when reporting errors and warnings. 2018-09-21 21:12:59 +03:00
configure Use vectored writes when reporting errors and warnings. 2018-09-21 21:12:59 +03:00
configure.ac Use vectored writes when reporting errors and warnings. 2018-09-21 21:12:59 +03:00
configure.host re PR target/78478 (Compile Error for i386-rtems) 2017-01-19 22:00:53 +01:00
gfortran.map re PR fortran/25829 ([F03] Asynchronous IO support) 2018-08-21 18:48:59 +00:00
kinds-override.h Update copyright years. 2018-01-03 11:03:58 +01:00
libgfortran.h Use vectored writes when reporting errors and warnings. 2018-09-21 21:12:59 +03:00
libgfortran.spec.in
libtool-version re PR fortran/34640 (ICE when assigning item of a derived-component to a pointer) 2017-09-10 17:02:53 +00:00
mk-kinds-h.sh
mk-sik-inc.sh
mk-srk-inc.sh