Rather than include namespace pollution in <grp.h> in order to declare
`gid_t', use the canonical protection scheme to define a type in two or more headers. This brings <grp.h> closer to POSIX.1-2001 conformance.
This commit is contained in:
parent
673623b376
commit
834dcade30
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=91325
@ -42,13 +42,17 @@
|
|||||||
#ifndef _GRP_H_
|
#ifndef _GRP_H_
|
||||||
#define _GRP_H_
|
#define _GRP_H_
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
|
||||||
#ifndef _POSIX_SOURCE
|
#ifndef _POSIX_SOURCE
|
||||||
#define _PATH_GROUP "/etc/group"
|
#define _PATH_GROUP "/etc/group"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _GID_T_DECLARED
|
||||||
|
#define _GID_T_DECLARED
|
||||||
|
typedef u_int32_t gid_t;
|
||||||
|
#endif
|
||||||
|
|
||||||
struct group {
|
struct group {
|
||||||
char *gr_name; /* group name */
|
char *gr_name; /* group name */
|
||||||
char *gr_passwd; /* group password */
|
char *gr_passwd; /* group password */
|
||||||
|
@ -73,7 +73,12 @@ typedef __volatile char *v_caddr_t; /* core address, pointer to volatile */
|
|||||||
typedef int32_t daddr_t; /* disk address */
|
typedef int32_t daddr_t; /* disk address */
|
||||||
typedef u_int32_t u_daddr_t; /* unsigned disk address */
|
typedef u_int32_t u_daddr_t; /* unsigned disk address */
|
||||||
typedef u_int32_t fixpt_t; /* fixed point number */
|
typedef u_int32_t fixpt_t; /* fixed point number */
|
||||||
|
|
||||||
|
#ifndef _GID_T_DECLARED
|
||||||
|
#define _GID_T_DECLARED
|
||||||
typedef u_int32_t gid_t; /* group id */
|
typedef u_int32_t gid_t; /* group id */
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef u_int32_t ino_t; /* inode number */
|
typedef u_int32_t ino_t; /* inode number */
|
||||||
typedef long key_t; /* IPC key (for Sys V IPC) */
|
typedef long key_t; /* IPC key (for Sys V IPC) */
|
||||||
typedef u_int16_t mode_t; /* permissions */
|
typedef u_int16_t mode_t; /* permissions */
|
||||||
|
Loading…
Reference in New Issue
Block a user