History

unlink outfile first

file mode problem if the outfile already exists

Changming Xu committed 15 years ago

Commit c27e76a1 parent c93eca41 file · +1 −0Browse files

Unified · Split

tccelf.c+1−0
@@ -2086,6 +2086,7 @@ static int elf_output_file(TCCState *s1, const char *filename) · 2085 unmodified lines
20862086 mode = 0666;
20872087 else
20882088 mode = 0777;
2089+ unlink(filename);
20892090 fd = open(filename, O_WRONLY | O_CREAT | O_TRUNC | O_BINARY, mode);
20902091 if (fd < 0) {
20912092 error_noabort("could not write '%s'", filename);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t