Commit 8ed9fc60 authored by Alex Brainman's avatar Alex Brainman

6l: change default output name to 6.out.exe on windows

R=golang-dev, vcc.163
CC=golang-dev
https://golang.org/cl/4670049
parent ce3c3953
...@@ -84,7 +84,7 @@ main(int argc, char *argv[]) ...@@ -84,7 +84,7 @@ main(int argc, char *argv[])
listinit(); listinit();
memset(debug, 0, sizeof(debug)); memset(debug, 0, sizeof(debug));
nerrors = 0; nerrors = 0;
outfile = "6.out"; outfile = nil;
HEADTYPE = -1; HEADTYPE = -1;
INITTEXT = -1; INITTEXT = -1;
INITDAT = -1; INITDAT = -1;
...@@ -134,11 +134,20 @@ main(int argc, char *argv[]) ...@@ -134,11 +134,20 @@ main(int argc, char *argv[])
if(argc != 1) if(argc != 1)
usage(); usage();
libinit(); mywhatsys(); // get goos
if(HEADTYPE == -1) if(HEADTYPE == -1)
HEADTYPE = headtype(goos); HEADTYPE = headtype(goos);
if(outfile == nil) {
if(HEADTYPE == Hwindows)
outfile = "6.out.exe";
else
outfile = "6.out";
}
libinit();
switch(HEADTYPE) { switch(HEADTYPE) {
default: default:
diag("unknown -H option"); diag("unknown -H option");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment