Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
5f4c052e
Commit
5f4c052e
authored
Jan 26, 2010
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gc: do not treat .6 different from .a anymore
R=ken2 CC=golang-dev
https://golang.org/cl/195050
parent
090e71e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
src/cmd/gc/lex.c
src/cmd/gc/lex.c
+8
-13
No files found.
src/cmd/gc/lex.c
View file @
5f4c052e
...
...
@@ -279,7 +279,7 @@ void
importfile
(
Val
*
f
,
int
line
)
{
Biobuf
*
imp
;
char
*
file
,
*
p
;
char
*
file
;
int32
c
;
int
len
;
Strlit
*
path
;
...
...
@@ -301,9 +301,6 @@ importfile(Val *f, int line)
return
;
}
if
(
!
findpkg
(
f
->
u
.
sval
))
fatal
(
"can't find import: %Z"
,
f
->
u
.
sval
);
path
=
f
->
u
.
sval
;
if
(
islocalname
(
path
))
{
snprint
(
cleanbuf
,
sizeof
cleanbuf
,
"%s/%s"
,
pathname
,
path
->
s
);
...
...
@@ -311,6 +308,9 @@ importfile(Val *f, int line)
path
=
strlit
(
cleanbuf
);
}
if
(
!
findpkg
(
path
))
fatal
(
"can't find import: %Z"
,
f
->
u
.
sval
);
importpkg
=
mkpkg
(
path
);
imp
=
Bopen
(
namebuf
,
OREAD
);
...
...
@@ -322,17 +322,12 @@ importfile(Val *f, int line)
if
(
len
>
2
&&
namebuf
[
len
-
2
]
==
'.'
&&
namebuf
[
len
-
1
]
==
'a'
)
{
if
(
!
skiptopkgdef
(
imp
))
fatal
(
"import not package file: %s"
,
namebuf
);
// assume .a files move (get installed)
// so don't record the full path.
p
=
file
+
len
-
f
->
u
.
sval
->
len
-
2
;
linehist
(
p
,
-
1
,
1
);
// acts as #pragma lib
}
else
{
// assume .6 files don't move around
// so do record the full path
linehist
(
file
,
-
1
,
0
);
}
// assume files move (get installed)
// so don't record the full path.
linehist
(
file
+
len
-
path
->
len
-
2
,
-
1
,
1
);
// acts as #pragma lib
/*
* position the input right
* after $$ and return
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment