os/user: add listgroups stub for AIX

This is required to build os/user.

Issue golang/go#19200

Change-Id: If54853a9d44bb4bb150178b15033eb4e3630196c
Reviewed-on: https://go-review.googlesource.com/38263
Reviewed-by: Ian Lance Taylor <iant@golang.org>
diff --git a/libgo/go/os/user/decls_aix.go b/libgo/go/os/user/decls_aix.go
new file mode 100644
index 0000000..dc10dfd
--- /dev/null
+++ b/libgo/go/os/user/decls_aix.go
@@ -0,0 +1,24 @@
+// Copyright 2017 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.
+
+package user
+
+import "syscall"
+
+// Declarations for the libc functions on AIX.
+
+//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
+
+//extern getgrnam_r
+func libc_getgrnam_r(name *byte, grp *syscall.Group, buf *byte, buflen syscall.Size_t, result **syscall.Group) int
+
+//extern getgrgid_r
+func libc_getgrgid_r(gid syscall.Gid_t, grp *syscall.Group, buf *byte, buflen syscall.Size_t, result **syscall.Group) int
+
+//extern getgrset
+func libc_getgrset(user *byte) *byte
diff --git a/libgo/go/os/user/listgroups_aix.go b/libgo/go/os/user/listgroups_aix.go
new file mode 100644
index 0000000..5b9f3f9
--- /dev/null
+++ b/libgo/go/os/user/listgroups_aix.go
@@ -0,0 +1,11 @@
+// Copyright 2017 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.
+
+package user
+
+import "fmt"
+
+func listGroups(u *User) ([]string, error) {
+	return nil, fmt.Errorf("user: list groups for %s: not supported on AIX", u.Username)
+}