From: nasm-bot f. C. G. <gor...@gm...> - 2018-09-22 10:48:17
|
Commit-ID: 69bb052e004fb374e2e0073d7b30ab495effaa99 Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=69bb052e004fb374e2e0073d7b30ab495effaa99 Author: Cyrill Gorcunov <gor...@gm...> AuthorDate: Sat, 22 Sep 2018 13:46:45 +0300 Committer: Cyrill Gorcunov <gor...@gm...> CommitDate: Sat, 22 Sep 2018 13:46:45 +0300 asm: Restore showing output for preproc mode in stdout Before the commit 81b62b9f54ac8e4019a9b2ec2b95ec0faa86bd2a we've been always putting -E,-e results into stdout if no output file provded. So bring this backward compatibility back. Signed-off-by: Cyrill Gorcunov <gor...@gm...> --- asm/nasm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/asm/nasm.c b/asm/nasm.c index 0c1df9f..acce3b8 100644 --- a/asm/nasm.c +++ b/asm/nasm.c @@ -481,9 +481,15 @@ int main(int argc, char **argv) if (ofmt->stdmac) preproc->extra_stdmac(ofmt->stdmac); - /* no output file name? */ - if (!outname) - outname = filename_set_extension(inname, ofmt->extension); + /* + * If no output file name provided and this + * is not preprocess mode, we're perfectly + * fine to output into stdout + */ + if (!outname) { + if (!(operating_mode & OP_PREPROCESS)) + outname = filename_set_extension(inname, ofmt->extension); + } /* define some macros dependent of command-line */ define_macros_late(); |