Reviewers: golang-dev_googlegroups.com,
Message:
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com),
I'd like you to review this change to
https://code.google.com/p/go/
Description:
cmd/gc: fix output filename generation on Windows
Please review this at http://codereview.appspot.com/6610060/
Affected files:
M src/cmd/gc/lex.c
Index: src/cmd/gc/lex.c
===================================================================
--- a/src/cmd/gc/lex.c
+++ b/src/cmd/gc/lex.c
@@ -2190,7 +2190,7 @@
{
Sym *s;
int32 h;
- char *p;
+ char *p, *q;
if(localpkg->name == nil) {
if(strcmp(pkgname, "_") == 0)
@@ -2230,6 +2230,11 @@
if(outfile == nil) {
p = strrchr(infile, '/');
+ if(windows) {
+ q = strrchr(infile, '\\');
+ if(q > p)
+ p = q;
+ }
if(p == nil)
p = infile;
else