aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/jcf-write.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/java/jcf-write.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/java/jcf-write.c')
-rw-r--r--gcc/java/jcf-write.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gcc/java/jcf-write.c b/gcc/java/jcf-write.c
index 59ef514..0d8f73e 100644
--- a/gcc/java/jcf-write.c
+++ b/gcc/java/jcf-write.c
@@ -3341,7 +3341,7 @@ make_class_file_name (tree clas)
if (stat (r, &sb) == -1
/* Try to make it. */
&& mkdir (r, 0755) == -1)
- fatal_io_error ("can't create directory %s", r);
+ fatal_error ("can't create directory %s: %m", r);
*s = sep;
/* Skip consecutive separators. */
@@ -3374,14 +3374,14 @@ write_classfile (tree clas)
temporary_file_name = concat (class_file_name, ".tmp", NULL);
stream = fopen (temporary_file_name, "wb");
if (stream == NULL)
- fatal_io_error ("can't open %s for writing", temporary_file_name);
+ fatal_error ("can't open %s for writing: %m", temporary_file_name);
jcf_dependency_add_target (class_file_name);
init_jcf_state (state, work);
chunks = generate_classfile (clas, state);
write_chunks (stream, chunks);
if (fclose (stream))
- fatal_io_error ("error closing %s", temporary_file_name);
+ fatal_error ("error closing %s: %m", temporary_file_name);
/* If a file named by the string pointed to by `new' exists
prior to the call to the `rename' function, the bahaviour
@@ -3394,7 +3394,7 @@ write_classfile (tree clas)
if (rename (temporary_file_name, class_file_name) == -1)
{
remove (temporary_file_name);
- fatal_io_error ("can't create %s", class_file_name);
+ fatal_error ("can't create %s: %m", class_file_name);
}
free (temporary_file_name);
free (class_file_name);