summaryrefslogtreecommitdiff
path: root/gcc/java/jcf-parse.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-13 18:06:52 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2003-05-13 18:06:52 +0000
commitd07c9932fe3d8be3478554d156bf3bf189027339 (patch)
treefd24969394b3b9dffb1cc037cebd35f54276e5b8 /gcc/java/jcf-parse.c
parenta82984ec82161ff946c0e260660fbbcbdad83b28 (diff)
downloadgcc-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/java/jcf-parse.c')
-rw-r--r--gcc/java/jcf-parse.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/java/jcf-parse.c b/gcc/java/jcf-parse.c
index e3e60cb20c6..2b20537a137 100644
--- a/gcc/java/jcf-parse.c
+++ b/gcc/java/jcf-parse.c
@@ -513,12 +513,12 @@ read_class (tree name)
if (!HAS_BEEN_ALREADY_PARSED_P (file))
{
if (!(finput = fopen (input_filename, "r")))
- fatal_io_error ("can't reopen %s", input_filename);
+ fatal_error ("can't reopen %s: %m", input_filename);
parse_source_file_1 (file, finput);
parse_source_file_2 ();
parse_source_file_3 ();
if (fclose (finput))
- fatal_io_error ("can't close %s", input_filename);
+ fatal_error ("can't close %s: %m", input_filename);
}
JCF_FINISH (current_jcf);
java_pop_parser_context (generate);
@@ -888,7 +888,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
int avail = 2000;
finput = fopen (input_filename, "r");
if (finput == NULL)
- fatal_io_error ("can't open %s", input_filename);
+ fatal_error ("can't open %s: %m", input_filename);
list = xmalloc(avail);
next = list;
for (;;)
@@ -907,7 +907,7 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
if (count == 0)
{
if (! feof (finput))
- fatal_io_error ("error closing %s", input_filename);
+ fatal_error ("error closing %s: %m", input_filename);
*next = '\0';
break;
}
@@ -1030,11 +1030,11 @@ java_parse_file (int set_yydebug ATTRIBUTE_UNUSED)
/* Close previous descriptor, if any */
if (finput && fclose (finput))
- fatal_io_error ("can't close input file %s", main_input_filename);
+ fatal_error ("can't close input file %s: %m", main_input_filename);
finput = fopen (IDENTIFIER_POINTER (name), "rb");
if (finput == NULL)
- fatal_io_error ("can't open %s", IDENTIFIER_POINTER (name));
+ fatal_error ("can't open %s: %m", IDENTIFIER_POINTER (name));
#ifdef IO_BUFFER_SIZE
setvbuf (finput, xmalloc (IO_BUFFER_SIZE),