aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-opts.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@codesourcery.com>2003-05-13 18:06:52 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-05-13 18:06:52 +0000
commitfa6ef81367f0c24ec0b04e753313cdb023e10217 (patch)
treefd24969394b3b9dffb1cc037cebd35f54276e5b8 /gcc/c-opts.c
parent3bec3c0c9cadc98f39f7072cb77a1c1b90ada59b (diff)
downloadgcc-fa6ef81367f0c24ec0b04e753313cdb023e10217.zip
gcc-fa6ef81367f0c24ec0b04e753313cdb023e10217.tar.gz
gcc-fa6ef81367f0c24ec0b04e753313cdb023e10217.tar.bz2
diagnostic.c (output_format): Add support for %m.
* diagnostic.c (output_format): Add support for %m. (output_printf, output_verbatim, diagnostic_set_info, verbatim): Set err_no field of the text_info structure being initialized. (fatal_io_error): Delete function. * diagnostic.h (text_info): Add err_no field. * toplev.h (fatal_io_error): Delete prototype. * c-opts.c, c-pch.c, dwarfout.c, ggc-common.c, ggc-page.c, graph.c * toplev.c, config/mips/mips.c, config/rs6000/host-darwin.c * f/com.c, java/jcf-parse.c, java/jcf-write.c, java/lex.c * objc/objc-act.c: Replace all calls to fatal_io_error with calls to fatal_error; add ": %m" to the end of all the affected error messages. From-SVN: r66769
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r--gcc/c-opts.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c
index 23ed899..ea2cef4 100644
--- a/gcc/c-opts.c
+++ b/gcc/c-opts.c
@@ -1556,7 +1556,7 @@ c_common_post_options (pfilename)
if (out_stream == NULL)
{
- fatal_io_error ("opening output file %s", out_fname);
+ fatal_error ("opening output file %s: %m", out_fname);
return false;
}
@@ -1650,7 +1650,7 @@ c_common_finish ()
{
deps_stream = fopen (deps_file, deps_append ? "a": "w");
if (!deps_stream)
- fatal_io_error ("opening dependency file %s", deps_file);
+ fatal_error ("opening dependency file %s: %m", deps_file);
}
}
@@ -1660,10 +1660,10 @@ c_common_finish ()
if (deps_stream && deps_stream != out_stream
&& (ferror (deps_stream) || fclose (deps_stream)))
- fatal_io_error ("closing dependency file %s", deps_file);
+ fatal_error ("closing dependency file %s: %m", deps_file);
if (out_stream && (ferror (out_stream) || fclose (out_stream)))
- fatal_io_error ("when writing output to %s", out_fname);
+ fatal_error ("when writing output to %s: %m", out_fname);
}
/* Either of two environment variables can specify output of