4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Copyright (c) 1988 AT&T */
23 /* All Rights Reserved */
27 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
29 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
30 * Use is subject to license terms.
36 #include <sys/feature_tests.h>
38 #include <sys/types.h>
40 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
60 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
67 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
69 extern struct passwd
*getpwuid(uid_t
); /* MT-unsafe */
70 extern struct passwd
*getpwnam(const char *); /* MT-unsafe */
72 #if !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__)
73 extern int putpwent(const struct passwd
*, FILE *);
74 #endif /* !defined(__XOPEN_OR_POSIX) || defined(__EXTENSIONS__) */
76 #if !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) || \
77 defined(__EXTENSIONS__)
78 extern void endpwent(void);
79 extern struct passwd
*getpwent(void); /* MT-unsafe */
80 extern void setpwent(void);
81 #endif /* !defined(__XOPEN_OR_POSIX) || defined(_XPG4_2) ... */
83 extern int getpwuid_r(uid_t
, struct passwd
*, char *, size_t,
85 extern int getpwnam_r(const char *, struct passwd
*, char *,
86 size_t, struct passwd
**);