1
// Copyright 2013 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 freebsd linux netbsd openbsd
10
#define NOPLAN9DEFINES
18
tmp = getenv("TMPDIR");
19
if(tmp == nil || strlen(tmp) == 0)
21
p = smprint("%s/go-link-XXXXXX", tmp);
37
if(!S_ISDIR(st.st_mode)) {
43
while((dp = readdir(d)) != nil) {
44
if(strcmp(dp->d_name, ".") == 0 || strcmp(dp->d_name, "..") == 0)
46
q = smprint("%s/%s", p, dp->d_name);