1 // Copyright 2012 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // +build darwin dragonfly freebsd linux nacl netbsd openbsd solaris windows
12 extern Slice syscall_Envs
__asm__ (GOSYM_PREFIX
"syscall.Envs");
15 runtime_getenv(const char *s
)
24 len
= runtime_findnull(bs
);
25 envv
= (String
*)syscall_Envs
.__values
;
26 envc
= syscall_Envs
.__count
;
27 for(i
=0; i
<envc
; i
++){
28 if(envv
[i
].len
<= len
)
30 v
= (const byte
*)envv
[i
].str
;