@@ -5386,7 +5386,27 @@ do_spec_1 (const char *spec, int inswitc
saved_suffix = NULL;
}
else
- t->suffix = save_string (suffix, suffix_length);
+ {
+#ifdef VMS
+ /* Force an explicit version number on VMS. */
+ char *vmssuffix = alloca (suffix_length + 4);
+
+ strncpy (vmssuffix, suffix, suffix_length);
+ if (suffix_length > 0)
+ {
+ strncpy (vmssuffix + suffix_length, ".1", 3);
+ suffix_length += 2;
+ }
+ else
+ {
+ strncpy (vmssuffix + suffix_length, "..1", 4);
+ suffix_length += 3;
+ }
+ suffix = vmssuffix;
+#endif
+ t->suffix = save_string (suffix, suffix_length);
+ }
+
t->unique = (c == 'u' || c == 'U' || c == 'j');
temp_filename = make_temp_file (t->suffix);
temp_filename_length = strlen (temp_filename);
@@ -1382,9 +1382,22 @@ init_asm_output (const char *name)
if (!strcmp (asm_file_name, "-"))
asm_out_file = stdout;
else
- asm_out_file = fopen (asm_file_name, "w+b");
+ asm_out_file = fopen (asm_file_name, "a+b");
if (asm_out_file == 0)
fatal_error ("can%'t open %s for writing: %m", asm_file_name);
+
+ if (asm_out_file != stdout)
+ {
+ int fd, ierr;
+
+ fd = fileno (asm_out_file);
+ if (fd < 0)
+ fatal_error ("can%'t get fileno for %s: %m", asm_file_name);
+
+ ierr = ftruncate (fd, 0);
+ if (ierr < 0)
+ fatal_error ("can%'t truncate %s: %m", asm_file_name);
+ }
}
if (!flag_syntax_only)