diff options
| author | seyko <seyko2@gmail.com> | 2016-04-13 05:17:13 +0300 |
|---|---|---|
| committer | seyko <seyko2@gmail.com> | 2016-04-13 05:17:13 +0300 |
| commit | b0296139a8ca3c15cd601ca1449e6547c8a352a0 (patch) | |
| tree | ae2245b05feab88ee77707bb8bd2eb728549fbd4 /tcc.c | |
| parent | f869dfb47ffef82fe6b6874706fe77b2a31956ed (diff) | |
| download | tinycc-b0296139a8ca3c15cd601ca1449e6547c8a352a0.tar.gz tinycc-b0296139a8ca3c15cd601ca1449e6547c8a352a0.tar.bz2 | |
fix for the -dM patch
assign fopen("/dev/null","w") to the s->ppfp insteed of NULL
Diffstat (limited to 'tcc.c')
| -rw-r--r-- | tcc.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -302,8 +302,13 @@ int main(int argc, char **argv) tcc_error("could not write '%s'", s->outfile); } s->dffp = s->ppfp; - if (s->dflag == 'M') - s->ppfp = NULL; + if (s->dflag == 'M') { +#ifndef TCC_TARGET_PE + s->ppfp = fopen("/dev/null", "w"); +#else + s->ppfp = fopen("nul", "w"); +#endif + } } tcc_set_output_type(s, s->output_type); |
