Commit 9224b4c8 authored by Shenghou Ma's avatar Shenghou Ma

cmd/gc: fix output filename generation on Windows

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/6610060
parent 51e8fe5b
......@@ -2190,7 +2190,7 @@ mkpackage(char* pkgname)
{
Sym *s;
int32 h;
char *p;
char *p, *q;
if(localpkg->name == nil) {
if(strcmp(pkgname, "_") == 0)
......@@ -2230,6 +2230,11 @@ mkpackage(char* pkgname)
if(outfile == nil) {
p = strrchr(infile, '/');
if(windows) {
q = strrchr(infile, '\\');
if(q > p)
p = q;
}
if(p == nil)
p = infile;
else
......
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