View | Details | Raw Unified | Return to bug 211394 | Differences between
and this patch

Collapse All | Expand All

(-)include/grp.h (-2 / +1 lines)
Lines 75-82 Link Here
75
		    struct group * (*)(gid_t));
75
		    struct group * (*)(gid_t));
76
#endif
76
#endif
77
#if __XSI_VISIBLE
77
#if __XSI_VISIBLE
78
/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */
78
void		 setgrent(void);
79
int		 setgrent(void);
80
#endif
79
#endif
81
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
80
#if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE
82
int		 getgrgid_r(gid_t, struct group *, char *, size_t,
81
int		 getgrgid_r(gid_t, struct group *, char *, size_t,
(-)include/stdlib.h (-1 / +1 lines)
Lines 222-228 Link Here
222
unsigned short
222
unsigned short
223
	*seed48(unsigned short[3]);
223
	*seed48(unsigned short[3]);
224
#ifndef _SETKEY_DECLARED
224
#ifndef _SETKEY_DECLARED
225
int	 setkey(const char *);
225
void	 setkey(const char *);
226
#define	_SETKEY_DECLARED
226
#define	_SETKEY_DECLARED
227
#endif
227
#endif
228
char	*setstate(/* const */ char *);
228
char	*setstate(/* const */ char *);
(-)include/unistd.h (-1 / +1 lines)
Lines 560-566 Link Here
560
void	 sethostid(long);
560
void	 sethostid(long);
561
int	 sethostname(const char *, int);
561
int	 sethostname(const char *, int);
562
#ifndef _SETKEY_DECLARED
562
#ifndef _SETKEY_DECLARED
563
int	 setkey(const char *);
563
void	 setkey(const char *);
564
#define	_SETKEY_DECLARED
564
#define	_SETKEY_DECLARED
565
#endif
565
#endif
566
int	 setlogin(const char *);
566
int	 setlogin(const char *);
(-)include/xlocale/_locale.h (-1 / +1 lines)
Lines 48-54 Link Here
48
#endif
48
#endif
49
49
50
locale_t	 duplocale(locale_t base);
50
locale_t	 duplocale(locale_t base);
51
int		 freelocale(locale_t loc);
51
void		 freelocale(locale_t loc);
52
locale_t	 newlocale(int mask, const char *locale, locale_t base);
52
locale_t	 newlocale(int mask, const char *locale, locale_t base);
53
const char	*querylocale(int mask, locale_t loc);
53
const char	*querylocale(int mask, locale_t loc);
54
locale_t	 uselocale(locale_t loc);
54
locale_t	 uselocale(locale_t loc);
(-)lib/libc/gen/crypt.c (-2 / +1 lines)
Lines 75-85 Link Here
75
	"WARNING!  setkey(3) not present in the system!");
75
	"WARNING!  setkey(3) not present in the system!");
76
76
77
/* ARGSUSED */
77
/* ARGSUSED */
78
int
78
void
79
setkey(const char *key __unused)
79
setkey(const char *key __unused)
80
{
80
{
81
	fprintf(stderr, "WARNING!  setkey(3) not present in the system!\n");
81
	fprintf(stderr, "WARNING!  setkey(3) not present in the system!\n");
82
	return (0);
83
}
82
}
84
83
85
__warn_references(encrypt,
84
__warn_references(encrypt,
(-)lib/libc/gen/getgrent.3 (-7 / +6 lines)
Lines 28-34 Link Here
28
.\"     From: @(#)getgrent.3	8.2 (Berkeley) 4/19/94
28
.\"     From: @(#)getgrent.3	8.2 (Berkeley) 4/19/94
29
.\" $FreeBSD$
29
.\" $FreeBSD$
30
.\"
30
.\"
31
.Dd April 16, 2003
31
.Dd July 26, 2016
32
.Dt GETGRENT 3
32
.Dt GETGRENT 3
33
.Os
33
.Os
34
.Sh NAME
34
.Sh NAME
Lines 60-66 Link Here
60
.Fn getgrgid_r "gid_t gid" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result"
60
.Fn getgrgid_r "gid_t gid" "struct group *grp" "char *buffer" "size_t bufsize" "struct group **result"
61
.Ft int
61
.Ft int
62
.Fn setgroupent "int stayopen"
62
.Fn setgroupent "int stayopen"
63
.Ft int
63
.Ft void
64
.Fn setgrent void
64
.Fn setgrent void
65
.Ft void
65
.Ft void
66
.Fn endgrent void
66
.Fn endgrent void
Lines 188-201 Link Here
188
.Dv NULL
188
.Dv NULL
189
and the return value is 0, no matching entry exists.)
189
and the return value is 0, no matching entry exists.)
190
.Pp
190
.Pp
191
The functions
191
The function
192
.Fn setgroupent
192
.Fn setgroupent
193
and
193
returns the value 1 if successful, otherwise the value
194
.Fn setgrent
195
return the value 1 if successful, otherwise the value
196
0 is returned.
194
0 is returned.
197
The functions
195
The functions
198
.Fn endgrent
196
.Fn endgrent ,
197
.Fn setgrent
199
and
198
and
200
.Fn setgrfile
199
.Fn setgrfile
201
have no return value.
200
have no return value.
(-)lib/libc/gen/getgrent.c (-3 / +1 lines)
Lines 533-544 Link Here
533
	return (rv);
533
	return (rv);
534
}
534
}
535
535
536
/* XXX IEEE Std 1003.1, 2003 specifies `void setgrent(void)' */
536
void
537
int				
538
setgrent(void)
537
setgrent(void)
539
{
538
{
540
	(void)_nsdispatch(NULL, setgrent_dtab, NSDB_GROUP, "setgrent", defaultsrc, 0);
539
	(void)_nsdispatch(NULL, setgrent_dtab, NSDB_GROUP, "setgrent", defaultsrc, 0);
541
	return (1);
542
}
540
}
543
541
544
542
(-)lib/libc/locale/freelocale.3 (-13 / +4 lines)
Lines 26-32 Link Here
26
.\" SUCH DAMAGE.
26
.\" SUCH DAMAGE.
27
.\"
27
.\"
28
.\" $FreeBSD$
28
.\" $FreeBSD$
29
.Dd September 17, 2011
29
.Dd July 26, 2016
30
.Dt FREELOCALE 3
30
.Dt FREELOCALE 3
31
.Os
31
.Os
32
.Sh NAME
32
.Sh NAME
Lines 39-45 Link Here
39
.Lb libc
39
.Lb libc
40
.Sh SYNOPSIS
40
.Sh SYNOPSIS
41
.In locale.h
41
.In locale.h
42
.Ft int
42
.Ft void
43
.Fn freelocale "locale_t locale"
43
.Fn freelocale "locale_t locale"
44
.Sh DESCRIPTION
44
.Sh DESCRIPTION
45
Frees a
45
Frees a
Lines 47-54 Link Here
47
This relinquishes any resources held exclusively by this locale.
47
This relinquishes any resources held exclusively by this locale.
48
Note that locales share reference-counted components,
48
Note that locales share reference-counted components,
49
so a call to this function is not guaranteed to free all of the components.
49
so a call to this function is not guaranteed to free all of the components.
50
.Sh RETURN VALUES
51
Returns 0 on success or -1 on error.
52
.Sh SEE ALSO
50
.Sh SEE ALSO
53
.Xr duplocale 3 ,
51
.Xr duplocale 3 ,
54
.Xr localeconv 3 ,
52
.Xr localeconv 3 ,
Lines 57-68 Link Here
57
.Xr uselocale 3 ,
55
.Xr uselocale 3 ,
58
.Xr xlocale 3
56
.Xr xlocale 3
59
.Sh STANDARDS
57
.Sh STANDARDS
60
The
58
This function conforms to
61
.Fn freelocale
59
.St -p1003.1-2008 .
62
function
63
differs from
64
.St -p1003.1-2008
65
in that its return type is
66
.Vt int
67
rather than
68
.Vt void .
(-)lib/libc/locale/xlocale.c (-12 / +10 lines)
Lines 325-344 Link Here
325
 * Free a locale_t.  This is quite a poorly named function.  It actually
325
 * Free a locale_t.  This is quite a poorly named function.  It actually
326
 * disclaims a reference to a locale_t, rather than freeing it.  
326
 * disclaims a reference to a locale_t, rather than freeing it.  
327
 */
327
 */
328
int
328
void
329
freelocale(locale_t loc)
329
freelocale(locale_t loc)
330
{
330
{
331
	/* Fail if we're passed something that isn't a locale. */
331
332
	if ((NULL == loc) || (LC_GLOBAL_LOCALE == loc)) {
332
	/*
333
		return (-1);
333
	 * Fail if we're passed something that isn't a locale. If we're
334
	}
334
	 * passed the global locale, pretend that we freed it but don't
335
	/* If we're passed the global locale, pretend that we freed it but don't
335
	 * actually do anything.
336
	 * actually do anything. */
336
	 */
337
	if (&__xlocale_global_locale == loc) {
337
	if (loc != NULL && loc != LC_GLOBAL_LOCALE &&
338
		return (0);
338
	    loc != &__xlocale_global_locale)
339
	}
339
		xlocale_release(loc);
340
	xlocale_release(loc);
341
	return (0);
342
}
340
}
343
341
344
/*
342
/*
(-)usr.sbin/pw/pw_vpw.c (-4 / +1 lines)
Lines 131-143 Link Here
131
	}
131
	}
132
}
132
}
133
133
134
RET_SETGRENT
134
void
135
vsetgrent(void)
135
vsetgrent(void)
136
{
136
{
137
	vendgrent();
137
	vendgrent();
138
#if defined(__FreeBSD__)
139
	return 0;
140
#endif
141
}
138
}
142
139
143
static struct group *
140
static struct group *
(-)usr.sbin/pw/pwupd.h (-8 / +2 lines)
Lines 38-49 Link Here
38
#include <stdbool.h>
38
#include <stdbool.h>
39
#include <stringlist.h>
39
#include <stringlist.h>
40
40
41
#if defined(__FreeBSD__)
42
#define	RET_SETGRENT	int
43
#else
44
#define	RET_SETGRENT	void
45
#endif
46
47
struct pwf {
41
struct pwf {
48
	int		    _altdir;
42
	int		    _altdir;
49
	void		  (*_setpwent)(void);
43
	void		  (*_setpwent)(void);
Lines 51-57 Link Here
51
	struct passwd * (*_getpwent)(void);
45
	struct passwd * (*_getpwent)(void);
52
	struct passwd	* (*_getpwuid)(uid_t uid);
46
	struct passwd	* (*_getpwuid)(uid_t uid);
53
	struct passwd	* (*_getpwnam)(const char * nam);
47
	struct passwd	* (*_getpwnam)(const char * nam);
54
	RET_SETGRENT	  (*_setgrent)(void);
48
	void		  (*_setgrent)(void);
55
	void		  (*_endgrent)(void);
49
	void		  (*_endgrent)(void);
56
	struct group  * (*_getgrent)(void);
50
	struct group  * (*_getgrent)(void);
57
	struct group  * (*_getgrgid)(gid_t gid);
51
	struct group  * (*_getgrgid)(gid_t gid);
Lines 141-147 Link Here
141
struct group * vgetgrent(void);
135
struct group * vgetgrent(void);
142
struct group * vgetgrgid(gid_t gid);
136
struct group * vgetgrgid(gid_t gid);
143
struct group * vgetgrnam(const char * nam);
137
struct group * vgetgrnam(const char * nam);
144
RET_SETGRENT   vsetgrent(void);
138
void           vsetgrent(void);
145
void           vendgrent(void);
139
void           vendgrent(void);
146
140
147
void copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid,
141
void copymkdir(int rootfd, char const * dir, int skelfd, mode_t mode, uid_t uid,

Return to bug 211394