]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: rename atoi to _atoi on Plan 9
authorDavid du Colombier <0intro@gmail.com>
Mon, 29 Dec 2014 16:35:42 +0000 (17:35 +0100)
committerDavid du Colombier <0intro@gmail.com>
Mon, 29 Dec 2014 17:04:24 +0000 (17:04 +0000)
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>
src/runtime/os1_plan9.go

index 63bba7c34c3d7c1576eb1ee6b5470f1bb79c20e9..61b0397249f0ad8cf9d98e25ee7ad8ad1fc3d59e 100644 (file)
@@ -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'