diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-13 18:06:52 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-05-13 18:06:52 +0000 |
commit | d07c9932fe3d8be3478554d156bf3bf189027339 (patch) | |
tree | fd24969394b3b9dffb1cc037cebd35f54276e5b8 /gcc/toplev.c | |
parent | a82984ec82161ff946c0e260660fbbcbdad83b28 (diff) | |
download | gcc-d07c9932fe3d8be3478554d156bf3bf189027339.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66769 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r-- | gcc/toplev.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c index 22cd711798a..800b72a9e39 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. */ |