Commit 29b4e34c authored by David du Colombier's avatar David du Colombier

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/2165Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 0bb8fc66
......@@ -70,7 +70,7 @@ func getpid() uint64 {
for c[0] == ' ' || c[0] == '\t' {
c = c[1:]
}
return uint64(atoi(c))
return uint64(_atoi(c))
}
func osinit() {
......@@ -254,7 +254,7 @@ func badsignal2() {
exits(&_badsignal[0])
}
func atoi(b []byte) int {
func _atoi(b []byte) int {
n := 0
for len(b) > 0 && '0' <= b[0] && b[0] <= '9' {
n = n*10 + int(b[0]) - '0'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment