Changeset 609 for branches/GNU/src/binutils/gas/output-file.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/gas/output-file.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* output-file.c - Deal with the output file 2 Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999 2 Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1996, 1998, 1999, 2001 3 3 Free Software Foundation, Inc. 4 4 … … 17 17 You should have received a copy of the GNU General Public License 18 18 along with GAS; see the file COPYING. If not, write to 19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 20 02111-1307, USA. */ 20 21 21 22 #include <stdio.h> … … 45 46 { 46 47 if (name[0] == '-' && name[1] == '\0') 47 { 48 as_fatal (_("Can't open a bfd on stdout %s "), name); 49 } 48 as_fatal (_("can't open a bfd on stdout %s"), name); 49 50 50 else if (!(stdoutput = bfd_openw (name, TARGET_FORMAT))) 51 51 { 52 as_perror (_("FATAL: Can't create %s"), name);52 as_perror (_("FATAL: can't create %s"), name); 53 53 exit (EXIT_FAILURE); 54 54 } 55 55 56 bfd_set_format (stdoutput, bfd_object); 56 57 #ifdef BFD_ASSEMBLER … … 70 71 { 71 72 bfd_perror (filename); 72 as_perror (_("FATAL: Can't close %s\n"), filename);73 as_perror (_("FATAL: can't close %s\n"), filename); 73 74 exit (EXIT_FAILURE); 74 75 } 75 76 #else 76 /* Close the bfd without getting bfd to write out anything by itself */77 /* Close the bfd without getting bfd to write out anything by itself. */ 77 78 if (bfd_close_all_done (stdoutput) == 0) 78 79 { 79 as_perror (_("FATAL: Can't close %s\n"), filename);80 as_perror (_("FATAL: can't close %s\n"), filename); 80 81 exit (EXIT_FAILURE); 81 82 } 82 83 #endif 83 stdoutput = NULL; /* Trust nobody! */84 stdoutput = NULL; /* Trust nobody! */ 84 85 } 85 86 … … 109 110 } 110 111 111 stdoutput = fopen (name, "wb"); 112 113 /* Some systems don't grok "b" in fopen modes. */ 114 if (stdoutput == NULL) 115 stdoutput = fopen (name, "w"); 116 112 stdoutput = fopen (name, FOPEN_WB); 117 113 if (stdoutput == NULL) 118 114 { 119 as_perror (_("FATAL: Can't create %s"), name);115 as_perror (_("FATAL: can't create %s"), name); 120 116 exit (EXIT_FAILURE); 121 117 } … … 128 124 if (EOF == fclose (stdoutput)) 129 125 { 130 as_perror (_("FATAL: Can't close %s"), filename);126 as_perror (_("FATAL: can't close %s"), filename); 131 127 exit (EXIT_FAILURE); 132 128 } 133 stdoutput = NULL; /* Trust nobody! */ 129 130 /* Trust nobody! */ 131 stdoutput = NULL; 134 132 } 135 133 136 134 void 137 135 output_file_append (where, length, filename) 138 char * where;139 long length;140 char * filename;136 char * where; 137 long length; 138 char * filename; 141 139 { 142 140 for (; length; length--, where++) 143 141 { 144 142 (void) putc (*where, stdoutput); 143 145 144 if (ferror (stdoutput)) 146 145 /* if ( EOF == (putc( *where, stdoutput )) ) */ 147 146 { 148 147 as_perror (_("Failed to emit an object byte"), filename); 149 as_fatal (_(" Can't continue"));148 as_fatal (_("can't continue")); 150 149 } 151 150 } … … 154 153 #endif 155 154 156 /* end of output-file.c */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.