| // Copyright 2012 The Go Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style |
| // license that can be found in the LICENSE file. |
| func getenv(s *byte) *byte { |
| val := gogetenv(gostringnocopy(s)) |
| // Strings found in environment are NUL-terminated. |
| var tracebackbuf [128]byte |
| func gogetenv(key string) string { |
| if len(key) > len(file)-6 { |
| fd := open(&file[0], _OREAD, 0) |
| r := pread(fd, unsafe.Pointer(&p[0]), int32(n), 0) |
| sp := (*_string)(unsafe.Pointer(&s)) |
| var _cgo_setenv unsafe.Pointer // pointer to C function |
| var _cgo_unsetenv unsafe.Pointer // pointer to C function |