mirror of
https://github.com/golang/go
synced 2024-11-19 03:44:40 -07:00
runtime: rename atoi to _atoi on Plan 9
Following change 2154, the goatoi function was renamed atoi. However, this definition conflicts with the atoi function defined in the Plan 9 runtime, which takes a []byte instead of a string. This change fixes the build on Plan 9. Change-Id: Ia0f7ca2f965bd5e3cce3177bba9c806f64db05eb Reviewed-on: https://go-review.googlesource.com/2165 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
0bb8fc6614
commit
29b4e34cf2
@ -70,7 +70,7 @@ func getpid() uint64 {
|
|||||||
for c[0] == ' ' || c[0] == '\t' {
|
for c[0] == ' ' || c[0] == '\t' {
|
||||||
c = c[1:]
|
c = c[1:]
|
||||||
}
|
}
|
||||||
return uint64(atoi(c))
|
return uint64(_atoi(c))
|
||||||
}
|
}
|
||||||
|
|
||||||
func osinit() {
|
func osinit() {
|
||||||
@ -254,7 +254,7 @@ func badsignal2() {
|
|||||||
exits(&_badsignal[0])
|
exits(&_badsignal[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
func atoi(b []byte) int {
|
func _atoi(b []byte) int {
|
||||||
n := 0
|
n := 0
|
||||||
for len(b) > 0 && '0' <= b[0] && b[0] <= '9' {
|
for len(b) > 0 && '0' <= b[0] && b[0] <= '9' {
|
||||||
n = n*10 + int(b[0]) - '0'
|
n = n*10 + int(b[0]) - '0'
|
||||||
|
Loading…
Reference in New Issue
Block a user