webrtc_m130/third_party/yasm/genmodule.diff
Artem Titov 739351d476 Roll chromium_revision 95336cb92b..191d55580e (557816:557824)
Change log: 95336cb92b..191d55580e
Full diff: 95336cb92b..191d55580e

Roll chromium third_party 4e16929f46..3a8f2a9e1e
Change log: 4e16929f46..3a8f2a9e1e

Changed dependencies:
* src/tools: c44a3f5eca..f524a53b81
DEPS diff: 95336cb92b..191d55580e/DEPS

No update to Clang.

TBR=titovartem@google.com,
BUG=None
CQ_INCLUDE_TRYBOTS=master.internal.tryserver.corp.webrtc:linux_internal

Change-Id: Ic9c4a62b050383646e9fcf5cc07a5653c14ac06e
Reviewed-on: https://webrtc-review.googlesource.com/76120
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Artem Titov <titovartem@webrtc.org>
Commit-Queue: Artem Titov <titovartem@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23205}
2018-05-11 11:17:05 +00:00

45 lines
1.1 KiB
Diff

diff --git a/libyasm/genmodule.c b/libyasm/genmodule.c
index 867d93a..027e2fe 100644
--- a/libyasm/genmodule.c
+++ b/libyasm/genmodule.c
@@ -58,9 +58,14 @@ main(int argc, char *argv[])
include *inc;
int isam = 0;
int linecont = 0;
-
- if (argc != 3) {
- fprintf(stderr, "Usage: %s <module.in> <Makefile[.am]>\n", argv[0]);
+ char *outfile;
+
+ if (argc == 3) {
+ outfile = OUTPUT;
+ } else if (argc == 4) {
+ outfile = argv[3];
+ } else {
+ fprintf(stderr, "Usage: %s <module.in> <Makefile[.am]> [<outfile>]\n", argv[0]);
return EXIT_FAILURE;
}
@@ -167,10 +172,10 @@ keepgoing:
fclose(in);
}
- out = fopen(OUTPUT, "wt");
+ out = fopen(outfile, "wt");
if (!out) {
- fprintf(stderr, "Could not open `%s'.\n", OUTPUT);
+ fprintf(stderr, "Could not open `%s'.\n", outfile);
return EXIT_FAILURE;
}
@@ -181,7 +186,7 @@ keepgoing:
if (!in) {
fprintf(stderr, "Could not open `%s'.\n", argv[1]);
fclose(out);
- remove(OUTPUT);
+ remove(outfile);
return EXIT_FAILURE;
}