aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.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/toplev.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/toplev.c')
-rw-r--r--gcc/toplev.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 22cd711..800b72a 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1764,10 +1764,10 @@ setup_core_dumping ()
{
struct rlimit rlim;
if (getrlimit (RLIMIT_CORE, &rlim) != 0)
- fatal_io_error ("getting core file size maximum limit");
+ fatal_error ("getting core file size maximum limit: %m");
rlim.rlim_cur = rlim.rlim_max;
if (setrlimit (RLIMIT_CORE, &rlim) != 0)
- fatal_io_error ("setting core file size limit to maximum");
+ fatal_error ("setting core file size limit to maximum: %m");
}
#endif
diagnostic_abort_on_error (global_dc);
@@ -1913,7 +1913,7 @@ open_dump_file (index, decl)
rtl_dump_file = fopen (dump_name, open_arg);
if (rtl_dump_file == NULL)
- fatal_io_error ("can't open %s", dump_name);
+ fatal_error ("can't open %s: %m", dump_name);
free (dump_name);
@@ -4878,7 +4878,7 @@ init_asm_output (name)
else
asm_out_file = fopen (asm_file_name, "w+");
if (asm_out_file == 0)
- fatal_io_error ("can't open %s for writing", asm_file_name);
+ fatal_error ("can't open %s for writing: %m", asm_file_name);
}
#ifdef IO_BUFFER_SIZE
@@ -5367,7 +5367,7 @@ process_options ()
{
aux_info_file = fopen (aux_info_file_name, "w");
if (aux_info_file == 0)
- fatal_io_error ("can't open %s", aux_info_file_name);
+ fatal_error ("can't open %s: %m", aux_info_file_name);
}
if (! targetm.have_named_sections)
@@ -5519,9 +5519,9 @@ finalize ()
if (asm_out_file)
{
if (ferror (asm_out_file) != 0)
- fatal_io_error ("error writing to %s", asm_file_name);
+ fatal_error ("error writing to %s: %m", asm_file_name);
if (fclose (asm_out_file) != 0)
- fatal_io_error ("error closing %s", asm_file_name);
+ fatal_error ("error closing %s: %m", asm_file_name);
}
/* Do whatever is necessary to finish printing the graphs. */