summaryrefslogtreecommitdiffstats
path: root/contrib/binutils/gas/output-file.c
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>2004-06-16 05:45:41 +0000
committerobrien <obrien@FreeBSD.org>2004-06-16 05:45:41 +0000
commit2504df11e1275f63f4c53377bf91eee996360cb5 (patch)
tree04848ae93445e503c4190ca1748abe15eabc9e11 /contrib/binutils/gas/output-file.c
parent6b4c52b743ec5e2e9f65d42b517feefad5017901 (diff)
downloadFreeBSD-src-2504df11e1275f63f4c53377bf91eee996360cb5.zip
FreeBSD-src-2504df11e1275f63f4c53377bf91eee996360cb5.tar.gz
Import of Binutils from the FSF 2.15 branch (just post-.0 release).
These bits are taken from the FSF anoncvs repo on 23-May-2004 04:41:00 UTC.
Diffstat (limited to 'contrib/binutils/gas/output-file.c')
-rw-r--r--contrib/binutils/gas/output-file.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/binutils/gas/output-file.c b/contrib/binutils/gas/output-file.c
index 531e35f..4c376b4 100644
--- a/contrib/binutils/gas/output-file.c
+++ b/contrib/binutils/gas/output-file.c
@@ -1,5 +1,5 @@
/* output-file.c - Deal with the output file
- Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2001
+ Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2001, 2003
Free Software Foundation, Inc.
This file is part of GAS, the GNU Assembler.
@@ -41,8 +41,7 @@
bfd *stdoutput;
void
-output_file_create (name)
- char *name;
+output_file_create (char *name)
{
if (name[0] == '-' && name[1] == '\0')
as_fatal (_("can't open a bfd on stdout %s"), name);
@@ -62,8 +61,7 @@ output_file_create (name)
}
void
-output_file_close (filename)
- char *filename;
+output_file_close (char *filename)
{
#ifdef BFD_ASSEMBLER
/* Close the bfd. */
@@ -86,10 +84,9 @@ output_file_close (filename)
#ifndef BFD_ASSEMBLER
void
-output_file_append (where, length, filename)
- char *where ATTRIBUTE_UNUSED;
- long length ATTRIBUTE_UNUSED;
- char *filename ATTRIBUTE_UNUSED;
+output_file_append (char *where ATTRIBUTE_UNUSED,
+ long length ATTRIBUTE_UNUSED,
+ char *filename ATTRIBUTE_UNUSED)
{
abort ();
}
@@ -100,8 +97,7 @@ output_file_append (where, length, filename)
static FILE *stdoutput;
void
-output_file_create (name)
- char *name;
+output_file_create (char *name)
{
if (name[0] == '-' && name[1] == '\0')
{
@@ -112,17 +108,22 @@ output_file_create (name)
stdoutput = fopen (name, FOPEN_WB);
if (stdoutput == NULL)
{
+#ifdef BFD_ASSEMBLER
+ bfd_set_error (bfd_error_system_call);
+#endif
as_perror (_("FATAL: can't create %s"), name);
exit (EXIT_FAILURE);
}
}
void
-output_file_close (filename)
- char *filename;
+output_file_close (char *filename)
{
if (EOF == fclose (stdoutput))
{
+#ifdef BFD_ASSEMBLER
+ bfd_set_error (bfd_error_system_call);
+#endif
as_perror (_("FATAL: can't close %s"), filename);
exit (EXIT_FAILURE);
}
@@ -132,18 +133,17 @@ output_file_close (filename)
}
void
-output_file_append (where, length, filename)
- char * where;
- long length;
- char * filename;
+output_file_append (char * where, long length, char * filename)
{
for (; length; length--, where++)
{
(void) putc (*where, stdoutput);
if (ferror (stdoutput))
- /* if ( EOF == (putc( *where, stdoutput )) ) */
{
+#ifdef BFD_ASSEMBLER
+ bfd_set_error (bfd_error_system_call);
+#endif
as_perror (_("Failed to emit an object byte"), filename);
as_fatal (_("can't continue"));
}
OpenPOWER on IntegriCloud