Browse Source
Add (hardcoded) runtime.GOROOT()
Necessary for the time package.
pull/6/head
Ayke van Laethem
6 years ago
No known key found for this signature in database
GPG Key ID: E97FF5335DFDFDED
1 changed files with
5 additions and
0 deletions
-
src/runtime/runtime.go
|
@ -21,6 +21,11 @@ func GOMAXPROCS(n int) int { |
|
|
return 1 |
|
|
return 1 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func GOROOT() string { |
|
|
|
|
|
// TODO: don't hardcode but take the one at compile time.
|
|
|
|
|
|
return "/usr/local/go" |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// Copy size bytes from src to dst. The memory areas must not overlap.
|
|
|
// Copy size bytes from src to dst. The memory areas must not overlap.
|
|
|
func memcpy(dst, src unsafe.Pointer, size uintptr) { |
|
|
func memcpy(dst, src unsafe.Pointer, size uintptr) { |
|
|
for i := uintptr(0); i < size; i++ { |
|
|
for i := uintptr(0); i < size; i++ { |
|
|