aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2010-05-28 14:03:31 +0100
committerJoseph Myers <jsm28@gcc.gnu.org>2010-05-28 14:03:31 +0100
commit7ca92787862d1b6cae3fbda685c1ddf2009e73b3 (patch)
tree065aff3d1d01e48c7777eadaa47358832eb00cb5 /gcc/fortran
parent8bf85f21b3a0180e286e2e32de3dd7f266729baf (diff)
downloadgcc-7ca92787862d1b6cae3fbda685c1ddf2009e73b3.zip
gcc-7ca92787862d1b6cae3fbda685c1ddf2009e73b3.tar.gz
gcc-7ca92787862d1b6cae3fbda685c1ddf2009e73b3.tar.bz2
final.c (rest_of_clean_state): Use %m in errors instead of strerror (errno).
* final.c (rest_of_clean_state): Use %m in errors instead of strerror (errno). * gengtype.c (read_input_list, close_output_files): Use xstrerror instead of strerror. * toplev.c (process_options): Use %m in errors instead of strerror (errno). * tree-dump.c (dump_begin): Use %m in errors instead of strerror (errno). fortran: * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror. * module.c (write_char, gfc_dump_module, gfc_use_module): Use xstrerror instead of strerror. lto: * lto-coff.c (coff_errmsg): Remove. (lto_coff_begin_section_with_type, lto_obj_append_data): Use %m in errors instead of coff_errmsg (-1). * lto-macho.c (mach_o_errmsg): Remove. (lto_obj_begin_section, lto_obj_append_data): Use %m in errors instead of mach_o_errmsg (-1). * lto.c (read_cgraph_and_symbols): Use %m in errors instead of xstrerror (errno). From-SVN: r159969
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/cpp.c5
-rw-r--r--gcc/fortran/module.c14
3 files changed, 16 insertions, 9 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 1566d08..00fc06e 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2010-05-28 Joseph Myers <joseph@codesourcery.com>
+
+ * cpp.c (gfc_cpp_init_0): Use xstrerror instead of strerror.
+ * module.c (write_char, gfc_dump_module, gfc_use_module): Use
+ xstrerror instead of strerror.
+
2010-05-26 Joseph Myers <joseph@codesourcery.com>
* cpp.c (cb_cpp_error): Save and restore
diff --git a/gcc/fortran/cpp.c b/gcc/fortran/cpp.c
index 6361085..8dbd157 100644
--- a/gcc/fortran/cpp.c
+++ b/gcc/fortran/cpp.c
@@ -523,7 +523,8 @@ gfc_cpp_init_0 (void)
print.outf = fopen (gfc_cpp_option.output_filename, "w");
if (print.outf == NULL)
gfc_fatal_error ("opening output file %s: %s",
- gfc_cpp_option.output_filename, strerror(errno));
+ gfc_cpp_option.output_filename,
+ xstrerror (errno));
}
else
print.outf = stdout;
@@ -533,7 +534,7 @@ gfc_cpp_init_0 (void)
print.outf = fopen (gfc_cpp_option.temporary_filename, "w");
if (print.outf == NULL)
gfc_fatal_error ("opening output file %s: %s",
- gfc_cpp_option.temporary_filename, strerror(errno));
+ gfc_cpp_option.temporary_filename, xstrerror (errno));
}
gcc_assert(cpp_in);
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index a419d6b..9bdee2a 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1299,7 +1299,7 @@ static void
write_char (char out)
{
if (putc (out, module_fp) == EOF)
- gfc_fatal_error ("Error writing modules file: %s", strerror (errno));
+ gfc_fatal_error ("Error writing modules file: %s", xstrerror (errno));
/* Add this to our MD5. */
md5_process_bytes (&out, sizeof (out), &ctx);
@@ -5124,7 +5124,7 @@ gfc_dump_module (const char *name, int dump_flag)
module_fp = fopen (filename_tmp, "w");
if (module_fp == NULL)
gfc_fatal_error ("Can't open module file '%s' for writing at %C: %s",
- filename_tmp, strerror (errno));
+ filename_tmp, xstrerror (errno));
/* Write the header, including space reserved for the MD5 sum. */
now = time (NULL);
@@ -5162,7 +5162,7 @@ gfc_dump_module (const char *name, int dump_flag)
if (fclose (module_fp))
gfc_fatal_error ("Error writing module file '%s' for writing: %s",
- filename_tmp, strerror (errno));
+ filename_tmp, xstrerror (errno));
/* Read the MD5 from the header of the old module file and compare. */
if (read_md5_from_module_file (filename, md5_old) != 0
@@ -5171,16 +5171,16 @@ gfc_dump_module (const char *name, int dump_flag)
/* Module file have changed, replace the old one. */
if (unlink (filename) && errno != ENOENT)
gfc_fatal_error ("Can't delete module file '%s': %s", filename,
- strerror (errno));
+ xstrerror (errno));
if (rename (filename_tmp, filename))
gfc_fatal_error ("Can't rename module file '%s' to '%s': %s",
- filename_tmp, filename, strerror (errno));
+ filename_tmp, filename, xstrerror (errno));
}
else
{
if (unlink (filename_tmp))
gfc_fatal_error ("Can't delete temporary module file '%s': %s",
- filename_tmp, strerror (errno));
+ filename_tmp, xstrerror (errno));
}
}
@@ -5530,7 +5530,7 @@ gfc_use_module (void)
if (module_fp == NULL)
gfc_fatal_error ("Can't open module file '%s' for reading at %C: %s",
- filename, strerror (errno));
+ filename, xstrerror (errno));
/* Check that we haven't already USEd an intrinsic module with the
same name. */