From fbac336391e238f8e92714fce5431f69d4f2d338 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Sun, 23 Jan 2005 00:14:31 +0000 Subject: re PR libfortran/19052 (unit 0 not preconnected to standard error) PR libgfortran/19052 * libgfortran.h (options_t): Add stderr_unit. * io/io.h (error_stream): Declare. * io/open.c (new_unit): Do not terminate abnormally if opening file preconnected to stdin, stdout, or stderr. * io/unit.c (init_units): Initialize stderr_unit. * io/unix.c (error_stream): New function. * runtime/environ.c (GFORTRAN_STDERR_UNIT): New environment variable. From-SVN: r94090 --- libgfortran/runtime/environ.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libgfortran/runtime') diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c index 87fe565..ae82f56 100644 --- a/libgfortran/runtime/environ.c +++ b/libgfortran/runtime/environ.c @@ -443,6 +443,11 @@ static variable variable_table[] = { "Unit number that will be preconnected to standard output\n" "(No preconnection if negative)"}, + {"GFORTRAN_STDERR_UNIT", 0, &options.stderr_unit, init_integer, + show_integer, + "Unit number that will be preconnected to standard error\n" + "(No preconnection if negative)"}, + {"GFORTRAN_USE_STDERR", 1, &options.use_stderr, init_boolean, show_boolean, "Sends library output to standard error instead of standard output."}, -- cgit v1.1