fix for the -dM patch
assign fopen("/dev/null","w") to the s->ppfp insteed of NULL
This commit is contained in:
9
tcc.c
9
tcc.c
@ -302,8 +302,13 @@ int main(int argc, char **argv)
|
|||||||
tcc_error("could not write '%s'", s->outfile);
|
tcc_error("could not write '%s'", s->outfile);
|
||||||
}
|
}
|
||||||
s->dffp = s->ppfp;
|
s->dffp = s->ppfp;
|
||||||
if (s->dflag == 'M')
|
if (s->dflag == 'M') {
|
||||||
s->ppfp = NULL;
|
#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);
|
tcc_set_output_type(s, s->output_type);
|
||||||
|
|||||||
Reference in New Issue
Block a user