FAQ
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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-dev @
categoriesgo
postedOct 6, '12 at 8:30a
activeOct 7, '12 at 6:15a
posts3
users2
websitegolang.org

2 users in discussion

Minux Ma: 2 posts Russ Cox: 1 post

People

Translate

site design / logo © 2022 Grokbase