aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/runtime.c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-03-16 23:10:33 -0700
committerRuss Cox <rsc@golang.org>2010-03-16 23:10:33 -0700
commit0c3a93ceb7e2167104cdc4a34ed62e7d9e39ce8c (patch)
tree67f79cf7c459b780316ad0f7134fe0867492f0f3 /src/pkg/runtime/runtime.c
parent5e6203d28b5106a445dd606ee25ca56f5460e12f (diff)
downloadgo-0c3a93ceb7e2167104cdc4a34ed62e7d9e39ce8c.tar.xz
runtime: add GOROOT and Version
R=r CC=golang-dev https://golang.org/cl/608041
Diffstat (limited to 'src/pkg/runtime/runtime.c')
-rw-r--r--src/pkg/runtime/runtime.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pkg/runtime/runtime.c b/src/pkg/runtime/runtime.c
index 3a94c8bce2..ed1bdcab8a 100644
--- a/src/pkg/runtime/runtime.c
+++ b/src/pkg/runtime/runtime.c
@@ -206,6 +206,15 @@ getenv(int8 *s)
return nil;
}
+void
+·getgoroot(String out)
+{
+ byte *p;
+
+ p = getenv("GOROOT");
+ out = gostring(p);
+ FLUSH(&out);
+}
int32
atoi(byte *p)