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 netbsd openbsd windows
10 extern Slice syscall_Envs
__asm__ (GOSYM_PREFIX
"syscall.Envs");
13 runtime_getenv(const char *s
)
22 len
= runtime_findnull(bs
);
23 envv
= (String
*)syscall_Envs
.__values
;
24 envc
= syscall_Envs
.__count
;
25 for(i
=0; i
<envc
; i
++){
26 if(envv
[i
].len
<= len
)
28 v
= (const byte
*)envv
[i
].str
;