assign fopen("/dev/null","w") to the s->ppfp insteed of NULL
Unified · Split
| @@ -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); |