1
0
mirror of https://github.com/golang/go synced 2024-11-19 22:04:44 -07:00

cmd/gc: fix windows build, probably

TBR=iant
CC=golang-dev
https://golang.org/cl/39540043
This commit is contained in:
Russ Cox 2013-12-09 13:02:56 -05:00
parent 1eac128d64
commit 9a53fb571d
2 changed files with 2 additions and 4 deletions

View File

@ -1182,7 +1182,6 @@ char* expstring(void);
void mkpackage(char* pkgname);
void unimportfile(void);
int32 yylex(void);
extern int windows;
extern int yylast;
extern int yyprev;

View File

@ -14,7 +14,6 @@
#define ungetc ccungetc
extern int yychar;
int windows;
int yyprev;
int yylast;
@ -548,7 +547,7 @@ islocalname(Strlit *name)
{
if(name->len >= 1 && name->s[0] == '/')
return 1;
if(windows && name->len >= 3 &&
if(ctxt->windows && name->len >= 3 &&
yy_isalpha(name->s[0]) && name->s[1] == ':' && name->s[2] == '/')
return 1;
if(name->len >= 2 && strncmp(name->s, "./", 2) == 0)
@ -2342,7 +2341,7 @@ mkpackage(char* pkgname)
if(outfile == nil) {
p = strrchr(infile, '/');
if(windows) {
if(ctxt->windows) {
q = strrchr(infile, '\\');
if(q > p)
p = q;