diff options
author | obrien <obrien@FreeBSD.org> | 2004-06-16 05:45:41 +0000 |
---|---|---|
committer | obrien <obrien@FreeBSD.org> | 2004-06-16 05:45:41 +0000 |
commit | abfa7c9435b930b7b0628c3d5aecb3d2bd2939ae (patch) | |
tree | 1b1eca723e1299baef96baf728843d50abdf24a8 /contrib/binutils/gas/output-file.c | |
parent | ed2b7f732a9e0add59e9276fb35caeac694ca2c7 (diff) | |
parent | 2504df11e1275f63f4c53377bf91eee996360cb5 (diff) | |
download | FreeBSD-src-abfa7c9435b930b7b0628c3d5aecb3d2bd2939ae.zip FreeBSD-src-abfa7c9435b930b7b0628c3d5aecb3d2bd2939ae.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r130561,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'contrib/binutils/gas/output-file.c')
-rw-r--r-- | contrib/binutils/gas/output-file.c | 36 |
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")); } |