History

fix for the -dM patch

assign fopen("/dev/null","w") to the s->ppfp insteed of NULL

seyko committed 10 years ago

Commit b0296131 parent f869dfb1 file · +7 −2Browse files

Unified · Split

tcc.c+7−2
@@ -302,8 +302,13 @@ int main(int argc, char **argv) · 301 unmodified lines
302 tcc_error("could not write '%s'", s->outfile);302 tcc_error("could not write '%s'", s->outfile);
303 }303 }
304 s->dffp = s->ppfp;304 s->dffp = s->ppfp;
305 if (s->dflag == 'M')305 if (s->dflag == 'M') {
306 s->ppfp = NULL;306#ifndef TCC_TARGET_PE
307 s->ppfp = fopen("/dev/null", "w");
308#else
309 s->ppfp = fopen("nul", "w");
310#endif
311 }
307 }312 }
308 313
309 tcc_set_output_type(s, s->output_type);314 tcc_set_output_type(s, s->output_type);

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