summaryrefslogtreecommitdiff
path: root/libgo/go/os/user/decls_unix.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/os/user/decls_unix.go')
-rw-r--r--libgo/go/os/user/decls_unix.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/libgo/go/os/user/decls_unix.go b/libgo/go/os/user/decls_unix.go
new file mode 100644
index 00000000000..f76e4c9bdfc
--- /dev/null
+++ b/libgo/go/os/user/decls_unix.go
@@ -0,0 +1,18 @@
+// Copyright 2014 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.
+
+// +build darwin dragonfly freebsd linux netbsd openbsd
+// +build cgo
+
+package user
+
+import "syscall"
+
+// Declarations for the libc functions on most Unix systems.
+
+//extern getpwnam_r
+func libc_getpwnam_r(name *byte, pwd *syscall.Passwd, buf *byte, buflen syscall.Size_t, result **syscall.Passwd) int
+
+//extern getpwuid_r
+func libc_getpwuid_r(uid syscall.Uid_t, pwd *syscall.Passwd, buf *byte, buflen syscall.Size_t, result **syscall.Passwd) int